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

28950 Коммитов

Автор SHA1 Сообщение Дата
nobu d2fa4d7118 error.c: NameError::message _dump
* error.c (name_err_mesg_dump): adapt argument number.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-24 15:58:15 +00:00
svn 4d33d02778 * 2012-12-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-24 15:57:57 +00:00
nobu 427bcc40ac error.c: VALUE to messages
* error.c (name_err_mesg_to_str, syserr_initialize): use VALUE to
  format messages.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-24 15:57:51 +00:00
nobu 8a3d7236cd test_argf.rb: duplicated test
* test/ruby/test_argf.rb (TestArgf#test_lines): remove duplicated test
  whose content is test_bytes actually.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-24 00:45:26 +00:00
nobu e9381c0559 * error.c (rb_compile_error_append): fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 22:23:52 +00:00
svn e1682d3474 * 2012-12-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 19:58:51 +00:00
naruse 02253a7961 * lib/net/http/generic_request.rb (Net::HTTPGenericRequest):
set content-length to zero on empty post requests
  by Gregory Ostermayr <gregory.ostermayr@gmail.com>
  https://github.com/ruby/ruby/pull/201 fix GH-201

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 19:58:44 +00:00
ko1 0f9b33c793 * thread.c: rename methods:
from Thread.async_interrupt_timing to Thread.handle_interrupt,
  from Thread.async_interrupted? to Thread.pending_interrupt?.
  Also rename option from `defer' to `never'.
  [ruby-core:51074] [ruby-trunk - Feature #6762]
* vm_core.c, thread.c: rename functions and data structure
  `async_errinfo' to `pending_interrupt'.
* thread.c: add global variables sym_immediate, sym_on_blocking and
  sym_never.
* cont.c, process.c, vm.c, signal.c: ditto.
* lib/sync.rb, lib/thread.rb: catch up this renaming.
* test/ruby/test_thread.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 10:18:58 +00:00
nobu 80b55686f0 profiler.rb: concurrent-execution
* lib/profiler.rb (Profiler__::PROFILE_PROC, print_profile): store
  profile data per threads for concurrent-execution.
  [ruby-core:22046] [Bug #1152]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 08:57:32 +00:00
nobu c81a5012f1 profiler.rb: Wrapper for BasicObject
* lib/profiler.rb (Profiler__::Wrapper): support calling singleton
  methods of an instance of BasicObject.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 08:57:27 +00:00
nobu ef6abd10c7 profiler.rb: TracePoint
* lib/profiler.rb (Profiler__::PROFILE_PROC): use TracePoint.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 08:57:22 +00:00
zzak cd6139cacd * lib/erb.rb: typos for ERB::new link
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 07:13:07 +00:00
zzak 4fa9e3307d * lib/erb.rb: Document ERB::new trim_mode '-' for lines ending in -%>
[ruby-core:51084] [Bug #7608]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 07:07:18 +00:00
nobu 1f3bf4ce55 goruby.c: IRB at end
* goruby.c (goruby_options): start IRB after goruby initialized.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 06:34:56 +00:00
zzak 4943b46ae7 * lib/irb/ruby-lex.rb: Add handling for %i and %I quoting to irb
Patch by flori [ruby-core:49550] [Bug #7392] [Github Issue #157]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 06:25:22 +00:00
nobu 20a5505349 zlib.c: function name
* ext/zlib/zlib.c (rb_gzreader_lines): fix function name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 06:21:49 +00:00
nobu 0fe46ceae3 marshal.c: rb_check_funcall_with_hook
* vm_eval.c (rb_check_funcall_with_hook): rb_check_funcall with hook
  which is called before calling method_missing or target method.
* marshal.c (w_object, r_object0): use rb_check_funcall_with_hook
  instead of respond_to? and call.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 06:05:50 +00:00
zzak 450b9bb6cb * re.c (rb_reg_eqq): doc: #=== is not a synonym for #=~, added example
[ruby-dev:46746] [Bug #7571]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 05:52:50 +00:00
nobu 3193599d85 marshal.c: use RB_TYPE_P
* marshal.c (r_entry0): use RB_TYPE_P.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 05:43:04 +00:00
nobu 482bf47d1f thread.c: ignore result of blocking_region_begin
* thread.c (BLOCKING_REGION): if fail_if_interrupted is false ignore
  the result of blocking_region_begin(), since it always is true in
  that case.  suppress "uninitialized" warnings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 05:35:15 +00:00
drbrain 6fe32d7266 * lib/rubygems/commands/check_command.rb: Added --doctor and --dry-run
options to clean up after failed uninstallation.
	* test/rubygems/test_gem_commands_check_command.rb:  Test for above.

	* lib/rubygems/commands/push_command.rb:  Allow pushes from RubyGems
	  2.0.0.preview3

	* lib/rubygems/commands/update_command.rb:  Use Gem.ruby_version

	* lib/rubygems/dependency.rb:  Update style.

	* lib/rubygems/installer.rb:  Ensure installed gem specifications will
	  be useable.  Refactor.
	* test/rubygems/test_gem_installer.rb:  ditto.

	* lib/rubygems/validator.rb:  Fixed bug with unreadable files.

	* lib/rubygems.rb:  Fixed broken methods.
	* test/rubygems/test_gem.rb:  Test for above.

	* test/rubygems/test_gem_commands_push_command.rb:  Fixed overridden
	  Gem.latest_rubygems_version


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 00:35:09 +00:00
knu c47c095b97 Deprecate #{lines,bytes,chars,codepoints} of IO-likes.
* io.c (rb_io_lines, rb_io_bytes, rb_io_chars, rb_io_codepoints):
  Deprecate IO#{lines,bytes,chars,codepoints} and those of ARGF.
  [Feature #6670]

* ext/stringio/stringio.c (strio_lines, strio_bytes, strio_chars)
  (strio_codepoints): Deprecate
  StringIO#{lines,bytes,chars,codepoints}. [Feature #6670]

* ext/zlib/zlib.c (rb_gzreader_lines, rb_gzreader_bytes):
  Deprecate Zlib::GzipReader#{lines,bytes}. [Feature #6670]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 17:22:04 +00:00
nobu 2742b6bc43 common.mk: srcs-ext
* common.mk (ext/dl/callback/callback.c): include in srcs-ext for
  snapshot.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 16:53:12 +00:00
zzak 78c56ae584 * lib/optparse.rb: Documentation for OptionParser to remove 'shadowed
outer local variable' from example and make obvious ARGV with
  non-option arguments.
  Patch by Marcus Stollsteimer [ruby-core:47460] [Bug #6997]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 16:36:30 +00:00
mrkn a756488c6d * include/ruby/intern.h: add the prototype declaration of
rb_num_coerce_bit.

* numeric.c (rb_num_coerce_bit): the new coerce function for bitwise
  binary operation.

* bignum.c (rb_big_and): use coerce to convert the argument, which isn't
  a Fixnum nor a Bignum, to the corresponding Integer object so that
  bitwise operations can support Integer-mimic objects.
  [Bug #1792] [ruby-core:39491]

* bignum.c (rb_big_or): ditto.

* bignum.c (rb_big_xor): ditto.

* numeric.c (bit_coerce): ditto.

* numeric.c (fix_and): ditto.

* numeric.c (fix_or): ditto.

* numeric.c (fix_xor): ditto.

* test/ruby/test_integer.rb: add tests for the above changes.

* test/ruby/test_bignum.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 15:06:22 +00:00
svn 0f16820fc0 * 2012-12-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 15:05:01 +00:00
nobu 6f02547d83 internal.h: quote unprintable
* internal.h (QUOTE, QUOTE_ID): quote unprintable chars in strings and
  IDs. [Bug #7574] [ruby-dev:46749]
* string.c (rb_str_quote_unprintable): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 15:04:57 +00:00
nobu 1df33a4a5f error.c: PRIsVALUE
* error.c (rb_compile_error, rb_compile_warn, rb_compile_warning),
  (rb_warn, rb_warning): support PRIsVALUE.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 14:59:21 +00:00
nagachika 920736460b * cont.c (rb_fiber_start): unify conditions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 13:08:24 +00:00
kosaki 398581564d * io.c (rb_io_wait_writable): use rb_thread_check_ints() instead
of rb_thread_fd_writable().
* io.c (rb_io_wait_readable): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 13:02:12 +00:00
nagachika c0a5027235 revert r38549. this typo in ChangeLog is intentional.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 12:52:31 +00:00
nobu f3b132faac object.c: no nested symbol
* object.c (rb_mod_const_get): symbol cannot be nested constant name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 11:31:13 +00:00
nobu 7815cbd7d0 object.c: defer creating string
* object.c (rb_mod_const_get): defer creating partinal name string
  until needed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 10:40:03 +00:00
nobu af1ca4cb13 object.c: check more strictly
* object.c (rb_mod_const_get): check more strictly.  [ruby-dev:46748]
  [Bug #7573]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 10:26:40 +00:00
nagachika 6a35c26b2d * cont.c (rb_fiber_start): in case of jump with TAG_FATAL,
enqueue error into async_errinfo_queue, because you cannot call
  TH_TAG_JUMP() in this function. [ruby-dev:45218]  [Bug #5993]

* thread.c (rb_threadptr_execute_interrupts): now INT2FIX(TAG_FATAL)
  can be popped from async_errinfo_queue.

* vm.c (rb_vm_make_jump_tag_but_local_jump): revert r38441.
  rb_vm_make_jump_tag_but_local_jump() shouldn't return exception
  in case of state == TAG_FATAL.

* test/ruby/test_fiber.rb (test_exit_in_fiber): fix a test to illuminate
  Thread.exit should terminate current Thread.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 06:45:28 +00:00
kazu a44e41e831 fix a typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 05:00:00 +00:00
shirosaki ca2fce0cf2 * gc.c (obj_id_to_ref): add a macro to treat Bignum object id.
This follows the change r38493.

* gc.c (id2ref): fix for working fine with Bignum object id on x64
  Windows.
* gc.c (wmap_finalize): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 04:25:18 +00:00
glass f9e621372d * struct.c (make_struct): remove junk ID check to allow members who
have junk name like "foo\000".
* test/ruby/test_struct.rb: Test for above.
  [Bug #7575] [ruby-dev:46750]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22 02:52:48 +00:00
drbrain 570b766901 * lib/net/http.rb: Requests may be created with a URI which sets the
Host header.  Responses contain the requested URI for easier redirect
	  following.  [ruby-trunk - Feature #6482]
	* lib/net/http/generic_request.rb:  ditto.
	* lib/net/http/response.rb:  ditto.j
	* NEWS (net/http):  Updated for above.
	* test/net/http/test_http.rb:  Tests for above.
	* test/net/http/test_http.rb:  ditto.
	* test/net/http/test_httpresponse.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 20:36:07 +00:00
zzak 34a3668c30 * lib/irb/slex.rb(#match): Typo, should be D_DETAIL
[ruby-core:51071] [Bug#7600]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 17:36:14 +00:00
zzak e8a7607ed0 * lib/irb/input-method.rb, lib/irb.rb: Typo in
InputMethod#readable_atfer_eof? to #readable_after_eof?
  [ruby-core:51069] [Bug #7599]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 17:29:18 +00:00
kosaki 585afbbc6a * vm_dump.c (rb_vm_bugreport): revert r38533.
* addr2line.c (fill_lines): add ELF sanity check.
  [Bug #7597] [ruby-dev:46786]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 17:21:12 +00:00
zzak 4da6fa28f8 * lib/irb/inspector.rb, lib/irb/context.rb: Move IRB::INSPECTORS and
class methods to IRB::Inspector [ruby-core:51067][Bug #7598]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 17:08:24 +00:00
svn 75584a1d86 * 2012-12-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 15:30:53 +00:00
usa e31b67700b * object.c (rb_obj_hash): shouldn't assume object_id can be long.
based on a patch by Heesob Park at [ruby-core:51060].
  cf. [Backport #7454]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 15:30:44 +00:00
kou 8346f7b2ad * ext/fiddle/lib/fiddle/struct.rb (Fiddle::CStructEntity#set_ctypes):
CPtr -> Pointer.
* test/fiddle/test_c_struct_entry.rb
  (Fiddle::TestCStructEntity#test_aref_pointer):
  Added the test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 14:16:02 +00:00
kou e852838cee * ext/fiddle/lib/fiddle/struct.rb (Fiddle::CStructEntity#set_ctypes):
CPtr -> Pointer.
* test/fiddle/test_c_struct_entry.rb
  (Fiddle::TestCStructEntity#test_aref_pointer_array):
  Added the test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 14:12:57 +00:00
kou 3fed8bc9a5 * ext/fiddle/lib/fiddle/import.rb (Fiddle::Importer#sizeof):
CPtr -> Pointer.
* test/fiddle/test_import.rb (Fiddle::TestImport#test_sizeof):
  Added the test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 13:44:44 +00:00
ko1 914611adbc * test/ruby/test_iseq.rb: disable a test which checks features
removed at r38532.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 13:36:17 +00:00
usa 9848f0d0ca * win32/{dir.h,win32.c} (rb_w32_readdir): removed old rb_w32_readdir()
and renamed from rb_w32_readdir_with_enc().
  [ruby-core:24864] [Feature #1927]

* dir.c (READDIR): follow above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21 13:06:17 +00:00