Граф коммитов

26646 Коммитов

Автор SHA1 Сообщение Дата
svn 90e812e81b * 2012-06-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-17 15:38:27 +00:00
nobu 7690aab833 test/readline/test_readline.rb: fix argument order
* test/readline/test_readline.rb (TestReadline#test_pre_input_hook)
  (TestReadline#test_insert_text): fix argument order.  expectd value
  should come first.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-17 15:38:22 +00:00
nobu 406a9fc5cf documentation for Dir.exist?
* dir.c (rb_file_directory_p): move documentation for Dir.exist? from
  file.c so that the proper description will be shown instead of the
  documentation of File.directory?.  [ruby-core:45685]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-17 13:23:56 +00:00
nobu cdeff42cc1 thread_win32.h: rb_thread_lock_t for USE_WIN32_MUTEX
* thread_win32.h (rb_thread_lock_t): make a union for USE_WIN32_MUTEX.
  this internal is used only in thread_win32.c, but has to be complete
  to define rb_thread_t.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-17 07:21:03 +00:00
nobu 3c56645634 thread_win32.c: USE_WIN32_MUTEX
* thread_win32.c (native_mutex_lock, native_mutex_destroy): fix for
  USE_WIN32_MUTEX.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-17 07:20:58 +00:00
svn dc320f43e1 * 2012-06-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-17 07:20:57 +00:00
nobu 34b6d06629 thread_win32.c: reserved pattern name
* thread_win32.c (native_cond_timedwait_ms): rename reserved pattern
  name.  user defined symbols should not start with __.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-17 07:20:53 +00:00
tadf 7cc92034be * ext/date/date_core.c: define date_sg_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-16 10:25:30 +00:00
tadf f5b033cd4e * ext/date/date_tmx.h: offset in struct tmx_funcs is now int.
* ext/date/date_strftime.c: ditto.
	* ext/date/date_core.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-16 09:49:17 +00:00
nobu 07784c78b9 eval.c: move running
* eval.c (ruby_setup): set running state in the normal case before
  popping a tag.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-16 09:31:50 +00:00
nobu c1740d890a test: reduce unnecessary output
* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): no empty lines
  if no warnigs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-16 04:23:36 +00:00
nobu c05042c95f test: reduce unnecessary output
* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): print retrying
  message only if retrying.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-16 04:23:34 +00:00
nobu de7eb55f7f test: reduce unnecessary output
* lib/test/unit.rb (Test::Unit::Runner#del_status_line): update
  @status_line_size and return true value.

* lib/test/unit.rb (Test::Unit::Runner#{put,add,jobs}_status): return
  non-nil/false if status line is used.

* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): clear status
  line at last.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-16 04:23:32 +00:00
nobu 04a7aabfbf lib/test/unit.rb: format workers results in the parent
* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): format workers
  results in the parent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 22:46:10 +00:00
nobu ff49900ab4 lib/test/unit.rb: format workers results in the parent
* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): format workers
  results in the parent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 22:46:08 +00:00
nobu 3f6e8aef37 [Bug #6598]
* tool/runruby.rb (File.realpath): return real path of expanded path.
  [Bug #6598]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 22:12:58 +00:00
nobu 3fb38c6178 bootstraptest: ignore -j
* bootstraptest/runner.rb (main): ignore -j option for compatibility
  with test/unit.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 22:12:30 +00:00
nobu 7ed81c28e0 lib/test/unit: refactoring puke
* lib/test/unit.rb (Test::Unit::Runner#puke): modify only result and
  drop useless reports, not override entirely.
* lib/test/unit/parallel.rb (Test::Unit::Worker#_run_suite): report
  unformatted results.  formatting messages is not a workers task.
* lib/test/unit/parallel.rb (Test::Unit::Worker#puke): store raw
  results.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 22:11:55 +00:00
svn 1eeaab8a39 * 2012-06-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 16:30:01 +00:00
tenderlove eac2646327 * ext/psych/lib/psych.rb: bumping psych to 1.3.3
* ext/psych/psych.gemspec: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 16:29:55 +00:00
kazu 7889d3bea9 fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 13:09:47 +00:00
kazu 064b70b603 * vm_backtrace.c (backtrace_collect): rename from backtreace_collect
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 12:01:45 +00:00
kazu 7193f4ae28 fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 12:01:41 +00:00
ko1 745c23b2d9 * vm_core.h: remove VM_FRAME_MAGIC_FINISH (finish frame type).
Before this commit:
  `finish frame' was place holder which indicates that VM loop
  needs to return function.
  If a C method calls a Ruby methods (a method written by Ruby),
  then VM loop will be (re-)invoked.  When the Ruby method returns,
  then also VM loop should be escaped.  `finish frame' has only
  one instruction `finish', which returns VM loop function.
  VM loop function executes `finish' instruction, then VM loop
  function returns itself.
  With such mechanism, `leave' instruction (which returns one
  frame from current scope) doesn't need to check that this `leave'
  should also return from VM loop function.
  Strictly, one branch can be removed from `leave' instructon.
  Consideration:
  However, pushing the `finish frame' needs costs because
  it needs several memory accesses.  The number of pushing
  `finish frame' is greater than I had assumed.  Of course,
  pushing `finish frame' consumes additional control frame.
  Moreover, recent processors has good branch prediction,
  with which we can ignore such trivial checking.
  After this commit:
  Finally, I decide to remove `finish frame' and `finish'
  instruction.  Some parts of VM depend on `finish frame',
  so the new frame flag VM_FRAME_FLAG_FINISH is introduced.
  If this frame should escape from VM function loop, then
  the result of VM_FRAME_TYPE_FINISH_P(cfp) is true.
  `leave' instruction checks this flag every time.
  I measured performance on it.  However on my environments,
  it improves some benchmarks and slows some benchmarks down.
  Maybe it is because of C compiler optimization parameters.
  I'll re-visit here if this cause problems.
* insns.def (leave, finish): remove finish instruction.
* vm.c, vm_eval.c, vm_exec.c, vm_backtrace.c, vm_dump.c:
  apply above changes.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 10:22:34 +00:00
nobu 0dc5b8ce8c Revert r35576 "lib/test/unit.rb: refactoring puke"
* lib/test/unit.rb (Test::Unit::Runner#puke): always add skipped
  results to the report for parallel test.  [Bug #6595]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 10:11:32 +00:00
nobu 19b4b7de3b test: TEST_COLORS
* bootstraptest/runner.rb (main): fixed typo.
* lib/test/unit.rb (Test::Unit::Runner#_prepare_run): ditto.
* sample/test.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 01:38:32 +00:00
nobu fa6a2e0324 test: skipped color
* lib/test/unit.rb (Test::Unit::Runner#failed): use different color
  for Skipped.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 00:56:41 +00:00
nobu 0243943aad test: TEST_COLORS
* bootstraptest/runner.rb (main): customize colors by dircolors-like
  style environment variable TEST_COLORS.

* lib/test/unit.rb (Test::Unit::Runner#_prepare_run): ditto.

* sample/test.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 00:56:39 +00:00
nobu 65672e63f5 test: unknown --color argument
* bootstraptest/runner.rb (main): warn unknown --color argument.

* sample/test.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 00:56:36 +00:00
nobu a8ddde3b78 test: help message
* bootstraptest/runner.rb (main): add --color option to the help
  message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 00:56:33 +00:00
yugui 88fa84a560 * nacl/pepper_main.c: Removed an unnecessary and errorneous inclusion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 00:03:56 +00:00
kazu 2c4b4a3091 fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 22:54:10 +00:00
nobu 7931bbf1b3 tool/make-snapshot MKDIR_P
* tool/make-snapshot (package): MKDIR_P is needed as direct macro to
  build enc/unicode/name2ctype.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 15:14:05 +00:00
svn c50e1d3aef * 2012-06-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 15:07:25 +00:00
nobu a73d6eb0e4 tool/make-snapshot MKDIR_P
* tool/make-snapshot (package): MKDIR_P is needed to build
  enc/unicode/name2ctype.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 15:07:13 +00:00
nobu d1351e98fd fix CPPOUTFILE
* configure.in (RUBY_CPPOUTFILE): check if output is really sent to
  specified file to tell if -o option works.  [ruby-dev:45742]
  [Bug#6591]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 14:00:02 +00:00
nobu b1644bfca9 fix CPPOUTFILE
* configure.in (RUBY_CPPOUTFILE): check if output file is actually
  created.  [ruby-dev:45742] [Bug#6591]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 13:49:51 +00:00
akr ea325fcd67 * process.c (proc_exec_sh): don't strip leading spaces of the script.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 13:11:41 +00:00
usa f927ec15c9 * file.c (rb_file_s_basename, rb_file_s_dirname): documentaion fix.
File.basename and File.dirname support File::ALT_SEPARATOR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 07:01:08 +00:00
nobu 6648846e05 ruby.c: add cast
* ruby.c (parse_and_compile_main): add cast to a pointer type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 04:03:31 +00:00
nobu 207c58b518 eval.c: set nil if nothing done
* eval.c (ruby_eval_main_internal): set nil to the result if nothing
  executed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 03:03:52 +00:00
nobu 073297789a fix r36079
* include/ruby/ruby.h: public symbols must have default visibility.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 03:03:48 +00:00
yugui 22e7c535a6 * nacl/pepper_maini.c: Applies the new embedding API to pepper_ruby.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 02:22:22 +00:00
yugui 8c9a453f2d Embedding CRuby interpreter without internal headers has been difficult
for few years because:
* NODE is no longer accessible.
* rb_iseq_eval_main crashes without preparing with rb_thread_t.
* some existing APIs calls exit(3) without giving the opportunity to
  finalize or handle errors to the client.
* No general-purpose function to compile a source to an iseq are
  published in the public headers.

This commit solves the problems.

	* include/ruby/ruby.h: Grouped APIs for embedding CRuby interpreter.
	  (ruby_setup, ruby_compile_main_from_file,
	  ruby_compile_main_from_string, ruby_eval_main,
	  ruby_set_script_name): new APIs to embed CRuby.
	  (ruby_opaque_t) Opaque pointer to an internal data, to NODE or iseq
	  in particular.

	* eval.c (ruby_setup): Similar to ruby_init but returns an error code
	  instead of exit(3) on error.
	  (ruby_eval_main): Similar to ruby_exec_node but returns the
	  evaluation result.
	  (ruby_eval_main_internal): renamed from ruby_exec_internal.

	* ruby.c (toplevel_context): new helper function.
	  (PREPARE_EVAL_MAIN): moved.
	  (process_options): refactored with new functions.
	  (parse_and_compile_main) new helper funciton.
	  (ruby_compile_main_from_file, ruby_compile_main_from_string) new API
	  (ruby_set_script_name): new API.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 02:22:08 +00:00
yugui f8601bd903 * eval.c: Add doxygen comments.
* ruby.c: ditto.

* thread_pthread.c: ditto

* version.c: ditto.

* vm_core.h: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 02:21:51 +00:00
naruse e9e603145f * configure.in: revert r36071 and add NetBSD to blacklist of -ansi.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-14 01:16:33 +00:00
naruse e901d2ce2c * thread_pthread.c (get_stack): Linux is the only OS which includes
the size of guard page into the stack size.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 23:18:35 +00:00
drbrain 4230682d27 * lib/drb/drb.rb: Replace broken links to the English DRb book.
Patch by Zachary Scott.  [ruby-trunk - Bug #6544]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 21:21:11 +00:00
drbrain 3d81b5c848 * lib/observer.rb: Update broken link to the Programming Ruby book.
Patch by Zachary Scott.  [ruby-trunk - Bug #6536]
* lib/drb/drb.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 21:18:29 +00:00
akr b41bc68688 update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-13 20:55:40 +00:00