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

24334 Коммитов

Автор SHA1 Сообщение Дата
nobu 5c92de87b4 eval.c: singleton class constants
* eval.c (rb_mod_s_constants): return its own constants for other
  than Module itself.  [ruby-core:59763] [Bug #9413]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-17 08:58:05 +00:00
mrkn 986a99b239 * ext/bigdecimal/bigdecimal.gemspec: bigdecimal version 1.2.5.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15 15:17:33 +00:00
glass bddde8eee3 * io.c (io_binwrite): use writev(2) to avoid double write if available.
* configure.in: check writev(2)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15 11:37:23 +00:00
nobu 6951fbca43 string.c: respect BOM
* string.c (get_encoding): respect BOM on pseudo encodings.
  [ruby-dev:47895] [Bug #9415]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15 05:04:36 +00:00
nobu 77ae7b2e83 string.c: use actual encodings
* string.c (get_actual_encoding): get actual encoding according to
  the BOM if exists.
* string.c (rb_str_inspect): use according encoding, instead of
  pseudo encodings, UTF-{16,32}.  [ruby-core:59757] [Bug #8940]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15 05:03:49 +00:00
glass 79e69ec715 * ext/thread/thread.c (rb_szqueue_clear): notify SZQUEUE_WAITERS
on SizedQueue#clear. [ruby-core:59462] [Bug #9342]

* test/thread/test_queue.rb: add test. the patch is from
  Justin Collins.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-14 12:14:48 +00:00
nobu 0a8988c132 bigdecimal.c: backword compatibility as gem
* ext/bigdecimal/bigdecimal.c (CLASS_NAME): macro to wrap
  depending on PRIsVALUE for 1.9.  [Backport #9406]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-14 06:58:43 +00:00
nobu 88383b058b bigdecimal.c: backword compatibility as gem
* ext/bigdecimal/bigdecimal.c (DECIMAL_SIZE_OF_BITS): fallback
  definition for 2.1 or older.  [ruby-core:59750] [Backport #9406]
* ext/bigdecimal/bigdecimal.c (raise_with_class): fallback definition
  for 1.9.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-14 05:51:58 +00:00
yugui ab4e0ab458 * vm_exec.c (cfp): Fixes a SEGV issue in r44554.
r11 can be broken by subroutine and sometimes causes SEGV at
  runtime.  Use r13 instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-14 02:32:45 +00:00
mrkn e7fe5648cf * ext/bigdecimal/bigdecimal.c (BigDecimal_divide): Add an additional
digit for the quotient to be compatible with bigdecimal 1.2.1 and
  the former.  [ruby-core:59365] [#9316] [#9305]

* test/bigdecimal/test_bigdecimal.rb: tests for the above change.

* ext/bigdecimal/bigdecimal.gemspec: bigdecimal version 1.2.4.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13 17:29:58 +00:00
nobu b2e85cbdf4 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13 06:51:17 +00:00
zzak 94f35c9bc7 * lib/xmlrpc/client.rb: [DOC] Remove note about SSL package on RAA
Since RAA has been deprecated, and the SSL package has been replaced
  with net/https this statement is entirely false and should be
  deleted. [Bug #9152]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13 05:57:35 +00:00
zzak 7433ce3e8c * lib/net/smtp.rb: [DOC] Remove dead link to RAA by Giorgos Tsiftsis
Fixes the following bugs: [Bug #9152] [Bug #9268] [Bug #9394]
* lib/open-uri.rb: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13 05:49:12 +00:00
zzak 3f039c96e2 * ext/openssl/ossl_pkey_dh.c: Fixed typo by Sandor Szücs [Bug #9243]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13 05:27:23 +00:00
charliesome 64926db998 * ext/thread/thread.c (rb_szqueue_push): check GET_SZQUEUE_WAITERS
instead of GET_QUEUE_WAITERS to prevent deadlock. Patch by Eric Wong.
  [Bug #9302] [ruby-core:59324]

* test/thread/test_queue.rb: add test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13 03:18:38 +00:00
nobu ff00300834 iseq.c: potential memory leak
* iseq.c (iseq_load): keep type_map to get rid of memory leak.
  based on a patch by Eric Wong at [ruby-core:59699].  [Bug #9399]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-12 07:41:10 +00:00
nobu 5e9b7bacc3 ruby/util.h: DECIMAL_SIZE_OF_BITS
* include/ruby/util.h (DECIMAL_SIZE_OF_BITS): a preprocessor
  constant macro to approximate decimal representation size of n-bits
  integer.
* iseq.c (register_label): use DECIMAL_SIZE_OF_BITS for better
  approximation.
* ext/bigdecimal/bigdecimal.c (BigMath_s_log): ditto.
* common.mk (iseq.o), ext/bigdecimal/depend (bigdecimal.o): add
  dependency to ruby/util.h for DECIMAL_SIZE_OF_BITS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-12 00:21:37 +00:00
yugui e85e95c409 * vm_exec.c (cfp): Avoid generating invalid binary for
NativeClient.
  r15 on x86_64 is reserved by NativeClient.  So r15 to cfp used to
  generate invalid binary under some combinations of compiler
  optimization flags.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-10 09:22:37 +00:00
nobu aee9f2879d vm_insnhelper.c: boudn method transplanting
* vm_insnhelper.c (vm_search_super_method): allow bound method from a
  module, yet another method transplanting.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-10 09:01:44 +00:00
tmm1 58f800a278 insns.def: add opt path for Hash#[] and Hash#[]= used with str literal keys
* insns.def (opt_aref_with): new instruction to optimize Hash#[],
  removing any allocation overhead when used with a string literal
  key. Patch by normalperson (Eric Wong). [ruby-core:59640] [Bug #9382]
* insns.def (opt_aset_with): new instruction to optimize Hash#[]=
* compile.c (iseq_compile_each): compiler shortcuts for new
  instructions
* hash.c (static VALUE rb_hash_compare_by_id_p): fix documentation for
  Hash#compare_by_identity to reflect frozen string sharing
* test/ruby/test_hash.rb (class TestHash): test for new behavior

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-10 04:54:08 +00:00
eregon d31cd06516 * range.c (Range#size): [DOC] improve description and add examples.
Patch by @skade. [Fixes GH-501]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09 21:23:45 +00:00
nobu f06ee90f95 tk/extconf.rb: fix libpathflag arguments
* ext/tk/extconf.rb: fix to pass arrays instead of strings to
  libpathflag.  patch at [ruby-core:59665].  [Bug #9386]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09 15:47:54 +00:00
nobu 791ff0a27a ChangeLog: commit miss
* ChangeLog: remove duplicated entry.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09 13:19:36 +00:00
nobu b5faf430cc configure.in: -mstackrealign
* configure.in: -mstackrealign is necessary for -msse2 working.
  [ruby-core:54716] [Bug #8349]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09 11:49:23 +00:00
nobu 40967a5c0b configure.in: use SSE2
* configure.in: use SSE2 instructions to drop unexpected precisions on
  other than mingw.  [ruby-core:59472] [Bug #8358]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09 11:46:26 +00:00
usa ac2864a871 * hash.c (rb_objid_hash): should return `long'. brushup r44534.
* object.c (rb_obj_hash): follow above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09 11:34:17 +00:00
nobu 4ee57e088f * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09 10:45:50 +00:00
ko1 c2e72fb343 * vm.c (rb_vm_pop_cfunc_frame): added. It cares c_return event.
The patch base by drkaes (Stefan Kaes).
  [Bug #9321]
* variable.c (rb_mod_const_missing): use rb_vm_pop_cfunc_frame()
  instead of rb_frame_pop().
* vm_eval.c (raise_method_missing): ditto.
* vm_eval.c (rb_iterate): ditto.
* internal.h (rb_vm_pop_cfunc_frame): add decl.
* test/ruby/test_settracefunc.rb: add tests.
  provided by drkaes (Stefan Kaes).
* vm.c, eval.c, include/ruby/intern.h (rb_frame_pop):
  move definition of rb_frame_pop() and deprecate it.
  It doesn't care about `return' events.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09 10:12:59 +00:00
usa 8abc55bc54 * hash.c (rb_any_hash): should treat the return value of rb_objid_hash()
as `long', because ruby assumes the object id of an object is `long'.
  this fixes test failures on mswin64 introduced at r44525.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09 08:42:42 +00:00
tenderlove b90076e85c * ext/psych/lib/psych/visitors/yaml_tree.rb: dumping strings with
quotes should not have changed.  [ruby-core:59316] [Bug #9300]

* ext/psych/lib/psych.rb: fixed missing require.

* test/psych/test_string.rb: test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09 00:56:45 +00:00
tenderlove 7c6e4f8f38 * ext/psych/lib/psych/visitors/to_ruby.rb: anonymous structs
should be able to roundtrip.  Thanks @splattael!

* test/psych/test_object_references.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-09 00:54:37 +00:00
nobu 5c0d17c9a2 vm_insnhelper.c: revive r44455 for bound module method
* vm_insnhelper.c (vm_search_super_method): when super called in a
  bound UnboundMethod generated from a module, no superclass is
  found since the current defined class is the module, then call
  method_missing in that case.  [ruby-core:59619] [Bug #9377]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-08 13:53:18 +00:00
nobu ab6efa5be2 object.c: hash value from objid with salt
* hash.c (rb_objid_hash): return hash value from object ID with a
  salt, extract from rb_any_hash().
* object.c (rb_obj_hash): return same value as rb_any_hash().
  fix r44125.  [ruby-core:59638] [Bug #9381]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-08 06:55:24 +00:00
nobu 3e9e4a6a96 lib/timeout.rb: fallback to Timeout::Error
* lib/timeout.rb (Timeout::ExitException.catch): pass arguments
  for new instance.
* lib/timeout.rb (Timeout::ExitException#exception): fallback to
  Timeout::Error if couldn't throw.  [ruby-dev:47872] [Bug #9380]
* lib/timeout.rb (Timeout#timeout): initialize ExitException with
  message for the fallback case.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-08 04:12:39 +00:00
nobu 97c0aaea71 timeout.rb: fix for ExitException
* lib/timeout.rb (Timeout#timeout): should not rescue ordinarily
  raised ExitException, which should not be thrown.
* lib/timeout.rb (Timeout::ExitException.catch): set @thread only if
  it ought to be caught.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-07 03:43:08 +00:00
nobu 9f5537c5b3 timeout.rb: defer creating custom exception
* lib/timeout.rb (Timeout#timeout): when a custom exception is given,
  no instance is needed to be caught, so defer creating new instance
  until it is raised.  [ruby-core:59511] [Bug #9354]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-07 03:42:37 +00:00
drbrain d5e810dbd2 * ChangeLog:
* lib/rubygems/basic_specification.rb (class Gem):
	* lib/rubygems/commands/contents_command.rb (prefix or only the files that are requir):
	* lib/rubygems/commands/install_command.rb (to write the specification by hand):
	* lib/rubygems/commands/setup_command.rb (class Gem):
	* lib/rubygems/commands/setup_command.rb (TEXT):
	* lib/rubygems/compatibility.rb (module Gem):
	* lib/rubygems/defaults.rb (module Gem):
	* lib/rubygems/deprecate.rb (module Gem):
	* lib/rubygems/installer.rb (class Gem):
	* lib/rubygems/platform.rb (class Gem):
	* lib/rubygems/rdoc.rb (class Gem):
	* lib/rubygems/request_set/lockfile.rb (class Gem):
	* lib/rubygems/resolver/installer_set.rb (class Gem):
	* lib/rubygems/resolver.rb (class Gem):
	* lib/rubygems/specification.rb (class Gem):
	* lib/rubygems/test_case.rb (class Gem):
	* lib/rubygems/test_case.rb (Also):
	* lib/rubygems/uninstaller.rb (class Gem):
	* lib/rubygems.rb (module Gem):
	* test/rubygems/test_gem.rb (class TestGem):
	* test/rubygems/test_gem_commands_contents_command.rb (lib):
	* test/rubygems/test_gem_commands_environment_command.rb (class TestGemCommandsEnvironmentCommand):
	* test/rubygems/test_gem_commands_install_command.rb (ERROR):
	* test/rubygems/test_gem_commands_update_command.rb (class TestGemCommandsUpdateCommand):
	* test/rubygems/test_gem_dependency_installer.rb (class TestGemDependencyInstaller):
	* test/rubygems/test_gem_installer.rb (load Gem):
	* test/rubygems/test_gem_installer.rb (gem):
	* test/rubygems/test_gem_request_set_lockfile.rb (GEM):
	* test/rubygems/test_gem_request_set_lockfile.rb (DEPENDENCIES):
	* test/rubygems/test_gem_specification.rb (dependencies):
	* test/rubygems/test_gem_specification.rb (duplicate dependency on b):
	* test/rubygems/test_gem_uninstaller.rb (class TestGemUninstaller):


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-07 01:19:28 +00:00
tmm1 738b8872ef ext/json: objects depend on $(ruby_headers)
* ext/json/generator/depend: add build dependencies for json extension
  Patch by normalperson (Eric Wong) [Bug #9374] [ruby-core:59609]
* ext/json/parser/depend: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-07 01:13:46 +00:00
tmm1 3cf4fe47e8 array.c: return first unique element in Array#uniq
* array.c (ary_add_hash): Fix consistency issue between Array#uniq and
  Array#uniq! [Bug #9340] [ruby-core:59457]
* test/ruby/test_array.rb (class TestArray): regression test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-06 19:38:20 +00:00
kazu 0a5b70e38d ignore *-fake.rb
* .gitignore: ignore *-fake.rb generated even when CROSS_COMPILING = no
  since r42862.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-06 12:29:46 +00:00
eregon d781caaf31 * compar.c (cmp_equal): remove error hiding in Comparable#==.
Comparable#== no longer rescues exceptions silently.
  This was the cause of quite a couple bugs. See #7688. [EXPERIMENTAL]
* test/ruby/test_comparable.rb: adapt assertion to match new behavior.
* lib/rdoc/method_attr.rb: fix bugs discovered by this change.
* test/rdoc/test_rdoc_normal_class.rb: fix bugs in tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-05 11:14:59 +00:00
charliesome 306c154c2d * struct.c (rb_struct_set): return assigned value from setter method
rather than struct object. [Bug #9353] [ruby-core:59509]

* test/ruby/test_struct.rb (test_setter_method_returns_value): add test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-04 13:44:34 +00:00
kazu 54f6b3fe82 test/ruby/test_gc.rb: use GC.stat(:key) instead of GC.stat
* test/ruby/test_gc.rb (TestGc#test_latest_gc_info): use
  GC.stat(:key) instead of GC.stat.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-04 12:47:01 +00:00
kazu 1714337d2d add a space
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-04 12:46:59 +00:00
nobu 5b0fb1aadd socket.c: format flags
* ext/socket/socket.c (rsock_syserr_fail_host_port): use format flags,
  '+' to inspect, ' ' to quote unprintables.
* ext/socket/socket.c (rsock_syserr_fail_path): ditto.
* ext/socket/socket.c (rsock_syserr_fail_raddrinfo): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-04 10:15:31 +00:00
nobu a3f2fe4e4d socket.c: use rb_syserr_fail
* ext/socket/socket.c (rsock_syserr_fail_host_port): add errno
  argument version anduse rb_syserr_fail_str() instead of
  rb_sys_fail_str() with restoring errno.
* ext/socket/socket.c (rsock_syserr_fail_path): ditto, and
  rb_syserr_fail().
* ext/socket/socket.c (rsock_sys_fail_sockaddr): ditto, use
  rsock_syserr_fail_raddrinfo().
* ext/socket/socket.c (rsock_sys_fail_raddrinfo): ditto.
* ext/socket/socket.c (setup_domain_and_type): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-04 10:13:36 +00:00
ktsj de7e488b08 * vm.c (RubyVM::OPTS): get rid of a garbage character.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-04 08:22:46 +00:00
drbrain 7295607815 * lib/rinda/ring.rb (Rinda::RingFinger#make_socket): Use
ipv4_multicast_ttl option for portability.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-04 01:18:20 +00:00
drbrain 9b4f2adcc1 * lib/rinda/ring.rb (Rinda::RingFinger#make_socket): Use
ipv4_multicast_loop option for portability.  Patch by Jeremy Evans.
  [ruby-trunk - Bug #9351]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-04 01:16:28 +00:00
charliesome 8f04556111 * ext/socket/socket.c (rsock_sys_fail_host_port): save and restore errno
before calling rb_sys_fail_str to prevent [BUG] errno == 0.
  Patch by Eric Wong. [ruby-core:59498] [Bug #9352]

* ext/socket/socket.c (rsock_sys_fail_path): ditto
* ext/socket/socket.c (rsock_sys_fail_sockaddr): ditto
* ext/socket/socket.c (rsock_sys_fail_raddrinfo): ditto
* ext/socket/socket.c (rsock_sys_fail_raddrinfo_or_sockaddr): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-03 10:12:38 +00:00
tmm1 5ac7c395c1 test/net/imap/test_imap.rb: fix test failures due to expired certs
* test/net/imap/cacert.pem: generate new CA cert, since the last one
  expired. [Bug #9341] [ruby-core:59459]
* test/net/imap/server.crt: new server cert signed with updated CA.
* test/net/imap/Makefile: add `make regen_certs` to automate this
  process.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-03 01:46:55 +00:00
eregon 1cc709a84a * ext/bigdecimal: update class method call style from :: to .
in documentation and usage.
* ext/bigdecimal/lib/bigdecimal/math.rb: [DOC] fix examples values.
  Computations were made using ruby 2.0.0p247 to ensure
  no effect of the recent BigDecimal bug.
* ext/bigdecimal/sample/nlsolve.rb: fix indent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-02 15:10:13 +00:00
glass 72385b042d * io.c (io_fwrite): freeze converted str.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-02 07:29:13 +00:00
nobu 243e581db0 eval.c: extra modifier
* eval.c (rb_longjmp): remove an extra modifier from the forward
  declaration to match the actual definition.  [ruby-core:59451]
  [Bug #9338]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-01 19:15:29 +00:00
glass b66d7182b7 * vm_eval.c (method_missing): use ALLOCV_N() instead of
ALLOCA_N() and rb_ary_tmp_new().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-01 16:40:11 +00:00
glass 56b0396944 * array.c (rb_ary_zip): use ALLOCV_N() instead of ALLOCA_N().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-01 15:55:51 +00:00
glass 2c11bda8b9 * hash.c (rb_hash_keys): make rb_hash_keys() static.
it is no longer used from array.c since r43969.
  the patch is from normalperson (Eric Wong).
  [ruby-core:59449] [Feature #9336]

* internal.h: remove definition of rb_hash_keys().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-01 15:19:23 +00:00
nobu 41d42a5937 configure.in: LDFLAGS and DLDFLAGS for opt-dir
* configure.in: reset LDFLAGS and DLDFLAGS for opt-dir again after
  LIBPATHFLAG and RPATHFLAG are set.  [ruby-dev:47868] [Bug #9317]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-01 09:19:37 +00:00
nobu dd6834b054 configure.in: use SSE2
* configure.in: use SSE2 instructions for drop unexpected
  precisions.  [ruby-core:54738] [Bug #8358]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-01 02:12:38 +00:00
nobu 8a46d4027c eval.c: raise with cause
* eval.c (rb_f_raise): add cause: optional keyword argument.
  [ruby-core:58610] [Feature #8257] [EXPERIMENTAL]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-31 14:49:16 +00:00
arton 2cdee22370 remove HAVE_FSEEKO from win32/win32.c
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-31 13:12:23 +00:00
glass 4e4e65a148 * io.c (io_fwrite): allocate frozen str only when str is not converted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-31 12:25:16 +00:00
nobu 2bca263569 mkmf.rb: expand RUBY_SO_NAME
* lib/mkmf.rb (RbConfig): expand RUBY_SO_NAME for extensions
  backward compatibility.  [ruby-core:59426] [Bug #9329]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-31 06:44:58 +00:00
zzak 5e3ec457d2 Add [DOC] tag [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-30 19:47:59 +00:00
ayumin ff529cdc25 * variable.c: Adding extra example in docs. [Bug #9210]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-30 14:39:35 +00:00
nobu 5db5677c66 encoding.c: mask dummy flags
* encoding.c (must_encindex, rb_enc_from_index, rb_obj_encoding): mask
  encoding index and ignore dummy flags.  [ruby-core:59354] [Bug #9314]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-30 09:34:19 +00:00
eban 5b59832c6a * tool/make-snapshot: needs CXXFLAGS. [ruby-core:59393][Bug #9320]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-30 07:14:43 +00:00
sorah e8792774df * lib/mkmf.rb (configuration): Make CXXFLAGS customizable.
Patch by Kohei Suzuki (eagletmt). [Fixes GH-492]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-29 09:43:12 +00:00
nobu a69f01fa52 proc.c: fix inherited method owner
* proc.c (mnew_from_me): keep iclass as-is, to make inheritance
  chain consistent.  [ruby-core:59358] [Bug #9315]

* proc.c (method_owner): return the original defined_class from
  prepended iclass, instead.

* vm_insnhelper.c (vm_search_super_method): revert r44455, no
  longer defined_class becomes a module.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-29 03:11:17 +00:00
nobu cb08e70822 test_sprintf.rb: sprintf with a hash as parameter
* test/ruby/test_sprintf.rb (test_hash): Added tests for sprintf
  with a hash as parameter.  [Fixes GH-491]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-28 23:47:31 +00:00
nobu 24c3331bdf vm_insnhelper.c: missing super in method module
* vm_insnhelper.c (vm_search_super_method): direct superclass of a
  module is found when super called in a Method object generated a
  method defined in a module, call method_missing in that case.
  [ruby-core:59358] [Bug #9315]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-28 23:21:14 +00:00
eregon 7e978b1070 * compar.c (cmp_eq_recursive): Fix the return value, the value for
failed #<=> should be nil. It was raising a NoMethodError for
  the test case TestComparable#test_no_cmp (undefined method `>'
  for false:FalseClass). Yet one more reason for #7688.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-28 22:28:39 +00:00
eregon 58a60b264d * object.c (Kernel#<=>) surround Comparable operators with <code> tags.
The #== method was hidden in ri/rdoc's output and was highlighting
  the line instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-28 13:22:42 +00:00
charliesome 75f4731f90 * benchmark/bm_so_meteor_contest.rb: [DOC] Fix a few typos
* ext/fiddle/lib/fiddle/import.rb: ditto
* ext/psych/lib/psych.rb: ditto
* ext/psych/lib/psych/nodes/sequence.rb: ditto
* ext/tk/lib/multi-tk.rb: ditto
* ext/tk/lib/tcltk.rb: ditto

Closes GH-490

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-28 08:25:28 +00:00
nobu 04bb9d6b75 parse.y: save cmdarg_stack in local scope
* parse.y (local_push_gen, local_pop_gen): save cmdarg_stack to
  isolate command argument state from outer scope.
  [ruby-core:59342] [Bug #9308]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-27 15:42:49 +00:00
usa cdf80f030d * win32/{setup.mak,Makefile.sub}: update fake.rb like
template/fake.rb.in.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-27 04:25:47 +00:00
usa c283ebb2d2 * win32/Makefile.sub (fake.rb): should depend on version.h because
if RUBY_VERSION is updated, fake.rb need to say the new version
  to avoid install error in rbconfig.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-26 07:11:51 +00:00
nobu 3a247f6489 hash.c: no extra states copy
* hash.c (HASH_REJECT_COPY_EXTRA_STATES): turn off the old
  behavior, copying extra states by accident.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-26 05:25:08 +00:00
matz ae9bda718d * version.h (RUBY_VERSION): 2.2.0 development has started.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-26 03:16:32 +00:00
usa 0928035b9f * ChangeLog: reformatting for the previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-26 01:29:51 +00:00
usa 71d3a294d4 * tool/merger.rb (tag): support 2.1.1 semi-automatic tagging and 2.2.0 explicit tagging.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-26 01:28:18 +00:00
marcandre 64f0682d7d * proc.c: Having any mandatory keyword argument increases min arity [#9299]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 21:36:19 +00:00
marcandre 43c3f447a4 * proc.c: Having optional keyword arguments makes maximum arity +1, not unlimited [#8072]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 21:27:48 +00:00
usa 52668960c5 * tool/release.sh: make symbolic links.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 16:10:21 +00:00
kazu da8b79b4c4 old ChangeLog and NEWS move to doc
* doc/NEWS-2.1.0: moved from NEWS
* doc/ChangeLog-2.1.0: moved ChangeLog older than created ruby_2_0_0 branch
* NEWS: NEWS for 2.2.0 that describes changes since 2.1.0
* ChangeLog: ChangeLog since created v2_1_0_rc1 tag (branch point of ruby_2_1 branch)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 16:05:13 +00:00
usa 213d2aa629 * tool/make-snapshot: support new version scheme.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 15:46:02 +00:00
nobu 27682eefa4 compile.c: unnamed keyword rest check
* compile.c (iseq_set_arguments): set arg_keyword_check from
  nd_cflag, which is set by parser.  internal ID is used for
  unnamed keyword rest argument, which should be separated from no
  keyword check.
* iseq.c (rb_iseq_parameters): if no keyword check, keyword rest is
  present.
* parse.y (new_args_tail_gen): set keywords check to nd_cflag, which
  equals to that keyword rest is not present.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 13:44:18 +00:00
zzak d3908b7f83 * lib/abbrev.rb: [DOC] rdoc format patch by Giorgos Tsiftsis [Bug #9146]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 13:34:27 +00:00
nobu 4398093755 iseq.c: fix parameter of unnamed rest keywords argument
* iseq.c (rb_iseq_parameters): push argument type symbol only for
  unnamed rest keywords argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 11:30:15 +00:00
nobu 7fd58845d9 proc.c: fix arity of rest keywords argument
* proc.c (rb_iseq_min_max_arity): maximum argument is unlimited if
  having rest keywords argument.  [ruby-core:53298] [Bug #8072]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 11:28:56 +00:00
ko1 485e6ebed8 * vm_insnhelper.c (argument_error): insert dummy frame to make
a backtrace object intead of modify backtrace string array.
  [Bug #9295]
* test/ruby/test_backtrace.rb: add a test for this patch.
  fix test to compare a result of Exception#backtrace with
  a result of Exception#backtrace_locations.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 09:35:03 +00:00
nobu 58a7cdaaf0 win32/win32.c: mingw jungle
* configure.in: let mingw do something black-magic, and check if
  _gmtime64_s() is available actually.
* win32/win32.c (gmtime_s, localtime_s): use _gmtime64_s() and
  _localtime64_s() if available, not depending on very confusing
  mingw variants macros.  based on the patch by phasis68 (Heesob
  Park) at [ruby-core:58764].  [ruby-core:58391] [Bug #9119]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 04:00:59 +00:00
mame e8052778c1 * sample/trick2013/: added the award-winning entries of TRICK 2013.
See https://github.com/tric/trick2013 for the contest outline.
  (Matz has approved the attachment.)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 03:45:15 +00:00
nobu 1e7a929c1d ossl_ssl.c: declare OP_MSIE_SSLV2_RSA_PADDING only if defined
* ext/openssl/ossl_ssl.c (Init_ossl_ssl): Declare a constant
  `OP_MSIE_SSLV2_RSA_PADDING` only if the macro is defined.  The
  `SSL_OP_MSIE_SSLV2_RSA_PADDING` has been removed from latest
  snapshot of OpenSSL 1.0.1.  [Fixes GH-488]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25 01:42:09 +00:00
nobu a11831a9a5 proc.c: Binding#local_variables
* proc.c (bind_local_variables): allowing binding to list its
  local variables.  patch by Jack Danger Canty <jackdanger AT
  squareup.com> at [ruby-core:56543].  [Feature #8773]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24 16:03:12 +00:00
nobu 7e2269a9ce test_fileutils.rb: tests for chown
* test/fileutils/fileasserts.rb (assert_ownership_user): new
  assertion for user ownership.
* test/fileutils/test_fileutils.rb (test_chown_error),
  (test_chown_without_permission, test_chown_with_root):
  based on the patch by vajrasky (Vajrasky Kok) at
  [ruby-core:59298].  [Feature #9292]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24 14:20:47 +00:00
nobu 1fc3319973 proc.c: make method by define_method public
* proc.c (rb_mod_define_method): consider visibility only if self
  in the caller is same as the receiver, otherwise make public as
  well as old behavior.  [ruby-core:57747] [Bug #9005]
  [ruby-core:58497] [Bug #9141]
* vm.c (rb_vm_cref_in_context): return ruby level cref if self is
  same.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24 07:28:11 +00:00
ko1 777cd24ebb * README.EXT: add a refer to URL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24 05:13:43 +00:00
ko1 215c40b813 * README.EXT: add a document about RGenGC.
Reviewed by havenwood.
  [misc #8962]
* README.EXT.ja: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24 05:00:37 +00:00
ko1 def62c3267 * include/ruby/ruby.h (RARRAY_ASET): try to avoid compiler warning.
[Bug #9287]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24 03:13:52 +00:00
nobu a137f4ed3a * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24 01:16:23 +00:00
usa 156d7f5f60 * test/fileutils/test_fileutils.rb (setup): should not call
Process.groups for Windows.  get rid of many errors introduced by
  r44364.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-23 20:06:44 +00:00
nobu e6847d1c55 test_fileutils.rb: tests for chown
* test/fileutils/fileasserts.rb (assert_ownership_group): new
  assertion for group ownership.
* test/fileutils/test_fileutils.rb (test_chown{,_verbose,_noop}):
  based on the patch by vajrasky (Vajrasky Kok) at
  [ruby-core:59281].  [Feature #9286]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-23 09:37:23 +00:00
nobu c25c84777c hash.c: reduce warning
* hash.c (HAS_EXTRA_STATES): warn extra states only when something
  differ.  [ruby-core:59254] [Bug #9275]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-23 06:53:51 +00:00
marcandre 9471f4187f * array.c: Have to_h raise on elements that are not key-value pairs [#9239]
* enum.c: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-23 03:42:29 +00:00
zzak 573762a7b7 * doc/syntax/methods.rdoc: [DOC] Added example for underscore
conventions in method names. Also added doc to clarify encoding
  character set support for Ruby programs and elaborated on defining
  predicate and bang methods. Based on a patch by @gaurish
  [Fixes GH-477] https://github.com/ruby/ruby/pull/477


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-22 20:13:09 +00:00
zzak cadd660689 * doc/ChangeLog-1.9.3: [DOC] Fix typos by @dvsuresh
[Fixes GH-485] https://github.com/ruby/ruby/pull/485
* ext/openssl/ossl_config.c: ditto
* lib/rss/utils.rb, lib/time.rb: ditto
* test/ruby/envutil.rb: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-22 18:21:14 +00:00
zzak ba12864469 commit miss from r44346
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-22 15:48:49 +00:00
drbrain e5eb6e9a3b * test/rubygems/test_gem_ext_builder.rb: Fix warning due to ambiguous
expression.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-22 02:12:38 +00:00
drbrain cb8be30ef1 * lib/rubygems/commands/install_command.rb: Restore gem install
--ignore-dependencies for remote gems
* test/rubygems/test_gem_commands_install_command.rb:  Test for the
  above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-22 02:06:02 +00:00
drbrain 87923e02ba * lib/rdoc.rb: Set RDoc to release version.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-22 01:25:41 +00:00
drbrain 1d8484d421 * lib/rubygems.rb: Set RubyGems to release version.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-22 01:19:20 +00:00
drbrain 67ec75152e * lib/rubygems.rb (module Gem): Fix comment for
Gem::load_path_insert_index.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-22 01:16:22 +00:00
ko1 94e870b000 * gc.c (ruby_gc_set_params): don't show obsolete warnings for
RUBY_FREE_MIN/RUBY_HEAP_MIN_SLOTS if
  RUBY_GC_HEAP_FREE_SLOTS/RUBY_GC_HEAP_INIT_SLOTS are given.
  [Bug #9276]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-21 19:11:12 +00:00
nobu 9f368b5ac9 file.c: destination path only
* file.c: remove unnecessary the source path from EEXIST error
  messages and show the destination path only.  [ruby-core:59202]
  [Feature #9263]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-21 04:00:31 +00:00
nobu 1ffbe07e17 resolv.rb: no encodings
* lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not
  consider encodings in hosts file.  [ruby-core:59239] [Bug #9273]
* lib/resolv.rb (Resolv::Config.parse_resolv_conf): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-21 03:37:26 +00:00
usa 0abe1fee13 * tool/make-snapshot: replace RUBY_PATCHLEVEL_STR in version.h to
show users that this ruby is a preview/rc version.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-20 20:46:21 +00:00
usa 7ff4413eab * win32/Makefile.sub (fake.rb): fixed wrong RUBY_PLATFORM, to correctly
install win32.h.
  [ruby-core:58801][Bug #9199] reported by arton.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-20 20:05:30 +00:00
ko1 f11b54213a * vm_method.c: check definition of
GLOBAL_METHOD_CACHE_SIZE and GLOBAL_METHOD_CACHE_MASK.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-20 08:57:24 +00:00
ko1 c702005a7b * include/ruby/ruby.h: rename OBJ_WRITE and OBJ_WRITTEN into
RB_OBJ_WRITE and RB_OBJ_WRITTEN.
* array.c, class.c, compile.c, hash.c, internal.h, iseq.c,
  proc.c, process.c, re.c, string.c, variable.c, vm.c,
  vm_eval.c, vm_insnhelper.c, vm_insnhelper.h,
  vm_method.c: catch up this change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-20 08:07:47 +00:00
ko1 b766cc4e70 * include/ruby/ruby.h: add a comment for WB interfaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-20 07:01:52 +00:00
nobu b0381a4b1f configure.in: use RUBY_APPEND_OPTIONS
* configure.in: DLDFLAGS is defined in --with-opt-dir handler, so
  ${DLDFLAGS=} does not work now.  use RUBY_APPEND_OPTIONS instead.
  [ruby-dev:47855] [Bug #9256]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-20 07:00:56 +00:00
naruse f10068dc44 * configure.in (AC_ARG_WITH): use withval directly.
fix failure on FreeBSD.
  http://fb32.rubyci.org/~chkbuild/ruby-trunk/log/20131217T070301Z.diff.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-20 05:51:12 +00:00
tmm1 3409690957 ruby.h: swap iv_index_tbl and super for struct RClass
* include/ruby/ruby.h (struct RClass): add super, remove iv_index_tbl.
  since RCLASS_SUPER() is commonly used inside while loops, we move it
  back inside struct RClass to improve cache hits. this provides a
  small improvement (1%) in hotspots like rb_obj_is_kind_of()
* internal.h (struct rb_classext_struct): remove super, add
  iv_index_table
* internal.h (RCLASS_SUPER): update for new location
* internal.h (RCLASS_SET_SUPER): ditto
* internal.h (RCLASS_IV_INDEX_TBL): ditto
* object.c (rb_class_get_superclass): ditto
* include/ruby/backward/classext.h (RCLASS_SUPER): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-20 05:10:07 +00:00
drbrain 37e4a8d39d * lib/rubygems: Update to RubyGems master 03d6ae7. Changes include:
* Fixed typos.

  * Relaxed Gem.ruby test for ruby packagers that do not use `ruby`.

* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-19 22:09:19 +00:00
ko1 0a8c1142b0 * gc.c (heap_get_freeobj): improve hot path performance.
* gc.c (heap_get_freeobj_from_next_freepage): replace with
  heap_get_freepage(). It returns freeobj instead of freepage.
  This is not on hot path.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-19 05:04:55 +00:00
drbrain f8bcd57cb7 * lib/rubygems: Update to RubyGems master af60443. Changes include:
* Improved speed of `gem install --ignore-dependencies`.

  * Open read-write for exclusive flock.  [ruby-trunk - Bug #9257]

  * Remove specification before install to prevent infinite loop.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-19 03:05:37 +00:00
tmm1 4cd675ea9e vm_insnhelper.c: optimize for loop
* vm_insnhelper.c (vm_call_iseq_setup_normal): simple for loop
  condition optimization. this area shows up as a hotspot in VM
  profiles.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-19 02:27:36 +00:00
ko1 9797647e25 * gc.c (newobj_of): don't need to RBASIC_SET_CLASS() which includes WB
here because created obj is always YOUNG/INFANT.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-19 01:51:16 +00:00
ko1 2ad4a1600b * benchmark/gc/gcbench.rb: check GC::OPTS availability
for not MRI 2.1.0.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-19 01:49:59 +00:00
tmm1 3f8deb966c gc.c: remove redundant freelist assignment
* gc.c (heap_get_freeobj): remove redundant assignment. heap->freelist
  is set after the while() loop already.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18 18:11:54 +00:00
ko1 49dcd2fee4 * test/runner.rb: fix commit miss on r44278.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18 16:55:01 +00:00
ko1 d767adf990 * gc.c (garbage_collect_body): lazy_sweep setting should work
without USE_RGENGC.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18 15:27:41 +00:00
ko1 a0a1d0f268 * gc.c (gc_profile_dump_major_reason): fix this function because major_reason
can be OR of multiple reasons.
* gc.c (gc_profile_dump_on): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18 14:34:23 +00:00
ko1 661cf78bef * gc.c (gc_profile_record_get): should return an empty array
when profiling is active.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18 08:04:08 +00:00
ko1 7bdb9fe17f * gc.c (gc_profile_clear, gc_profile_enable): remove rest_sweep().
* gc.c: check objspace->profile.current_record before inserting
  profiling record by new macro gc_prof_enabled().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18 07:58:04 +00:00
ko1 26e553d0ed * vm_exec.h (VM_DEBUG_STACKOVERFLOW): added.
disable stack overflow check for every stack pushing as default.
* vm_exec.c (vm_stack_overflow_for_insn): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18 05:33:50 +00:00
drbrain 228ad3d799 * lib/rubygems: Update to RubyGems master d8f12e2. This increases the
speed of `gem install --ignore-dependencies` which helps bundler
  tests.
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18 01:02:58 +00:00
ko1 2648a803c1 * test/ruby/test_gc.rb (test_expand_heap): allow +/-1 diff.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18 00:01:08 +00:00
ktsj 5760abaf08 * test/ruby/test_io.rb: fix duplicated test name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-17 14:46:56 +00:00
nobu 571955c13f hash.c: revert
* hash.c (rb_hash_reject): revert to deprecated behavior, with
  warnings, due to compatibility for HashWithDifferentAccess.
  [ruby-core:59154] [Bug #9223]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-17 11:15:00 +00:00
knu f38a2926e0 misc/ruby-electric.el: Import version 2.1.1.
* ruby-electric-delete-backward-char: Enable support for number
    prefix.

  * ruby-electric-curlies: Fix electric operation after an open
    curly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-17 08:33:01 +00:00
nobu a98e343d39 vm_trace.c: isolate exceptions
* vm_trace.c (rb_postponed_job_flush): isolate exceptions in
  postponed jobs and restore outer ones.  based on a patch by
  tarui.  [ruby-core:58652] [Bug #9168]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-17 07:19:25 +00:00
tmm1 7c51c8fd17 configure.in: build probes with systemtap's dtrace wrapper
* configure.in (RUBY_DTRACE_POSTPROCESS): Fix compatibility with
  systemtap on linux. stap requires `dtrace -G` post-processing, but
  the dtrace compatibility wrapper is very strict about probes.d
  syntax.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-17 02:03:09 +00:00
drbrain e80f2c118a * lib/rubygems: Update to RubyGems master 1c5f4b3. Allows rubygems
repackagers to disable backward-compatible shared gem directory
  behavior.
* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 20:18:29 +00:00
drbrain 14e213c3c0 * NEWS (RDoc): Update version number so I don't have to change it
for the final release.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 20:14:50 +00:00
kazu 4210568457 fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 13:59:38 +00:00
ko1 9ae9f7c9d3 * gc.c (rb_objspace_markable_object_p): should check special_const_p
first (by is_markable_object()).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 10:22:03 +00:00
ko1 d4f80bd74e * ext/objspace/objspace.c (reachable_object_from_root_i): use
compare_by_identity hash to avoid hash modify problem
  during iteration.
  [Bug #9252]
* ext/objspace/objspace.c (reachable_objects_from_root): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 10:16:51 +00:00
nobu f89bd95b4d * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 09:21:05 +00:00
ko1 8d254db25b * gc.c (gc_verify_internal_consistency): should not use
rb_objspace_each_objects() because it call rest_sweep().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 09:19:24 +00:00
ko1 1a209e496d * gc.c (rb_objspace_markable_object_p): fix last commit (build error).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 09:07:52 +00:00
ko1 1779f77fbb * gc.c (rb_objspace_markable_object_p): it should be live objects.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 09:05:57 +00:00
ko1 60b7bd2ea3 * gc.c (rb_objspace_each_objects): should not clear dont_lazy_sweep
flag in nested case.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 09:01:49 +00:00
ko1 d8eb7f3c0d * vm_method.c (rb_method_entry_make): fix WB miss.
Note that rb_method_entry_t::klass is not constified.
  We may  constify this field.
* test/ruby/test_alias.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 07:46:48 +00:00
a_matsuda c3405de433 * ChangeLog: [DOC] Fix typo
s/geneartion/generation/
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 06:11:48 +00:00
nobu 4fcdce3b68 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 05:21:05 +00:00
ko1 c979a67bb4 * gc.c: use gc_verify_internal_consistency() instead of
gc_check_before_marks_i() for check consistency
  on RGENGC_CHECK_MODE >= 2.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 05:18:21 +00:00
naruse 2a732947a6 * process.c (make_clock_result): add :second as a unit for
Process.clock_gettime.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 05:04:03 +00:00
ko1 dfa892af43 * gc.c: introduce GC.verify_internal_consistency method to verify GC
internal data structure.
  Now this method only checks geneartion (old/young) consistency.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 04:12:48 +00:00
tmm1 d87de08512 typo: wheb -> when
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 02:51:25 +00:00
tmm1 99df7a1b5b gc.c: fix build with RGENGC_ESTIMATE_OLDMALLOC=0
* gc.c (gc_info_decode): Fix build errors wheb compiled with
	  RGENGC_ESTIMATE_OLDMALLOC=0
	* gc.c (objspace_malloc_increase): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16 02:50:45 +00:00
ko1 1448b0abf5 * ext/objspace/objspace.c (reachable_object_from_root_i):
reachable objects should not include categories and
  category_objects because it is noisy information.
  In fact, objects created after calling
  ObjectSpace.reachable_objects_from_root should not be included
  as a returning hash objects. Currently, mswin64 platform has a
  problem because of this behaviour. Should we trace new objects?



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-15 04:42:23 +00:00
drbrain 6c9a3cb681 * lib/rubygems/basic_specification.rb (class Gem): Revert r44213, it
causes SystemStackError for bundler


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-15 00:51:37 +00:00
drbrain 23201ab1c4 * lib/rdoc: Update to RDoc master 263a9e5. This improves the
accessibility of the search box.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 22:09:35 +00:00
drbrain e6147745d5 * lib/rubygems/basic_specification.rb: Update to RubyGems master
9c718fe.  Removes code duplication.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 20:28:45 +00:00
nobu 91afce9afa vm_insnhelper.c: post arguments as mandatory
* vm_insnhelper.c (vm_callee_setup_arg_complex): count post
  arguments as mandatory arguments.  [ruby-core:57706] [Bug #8993]
* vm_insnhelper.c (vm_yield_setup_block_args): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 08:39:17 +00:00
nobu 36e9f58ddf configure.in: unexpand exec_prefix in rubylibprefix
* configure.in (rubylibprefix): replace exec_prefix as well as
  bindir and libdir.  a patch by kimuraw (Wataru Kimura) at
  [ruby-dev:47852].  [Bug #9160]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 07:26:52 +00:00
nobu 95ed081663 logger.rb: fix extra log ratation
* lib/logger.rb (lock_shift_log): no need to rotate the log file
  if it has been rotated by another process.  based on the patch
  by no6v (Nobuhiro IMAI) in [ruby-core:58620].  [Bug #9133]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 05:43:01 +00:00
nobu b83d68a38f proc.c: method by respond_to_missing?
* proc.c (mnew_from_me): method by respond_to_missing? should be
  owned by the original class.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 04:02:00 +00:00
nobu 1e4a955435 scanf.rb: fix rescue modifier
* lib/scanf.rb (IO#scanf): fix mistaken use of rescue modifier.
  a patch by Mon_Ouie at [ruby-core:52813].  [Bug #7940]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 02:55:33 +00:00
nobu fcd7887407 util.c: bump stack size in ruby_qsort()
* util.c (ruby_qsort): fix potential stack overflow on a large
  machine.  based on the patch by Conrad Irwin <conrad.irwin AT
  gmail.com> at [ruby-core:51816].  [Bug #7772]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 02:45:07 +00:00
nobu 241ca7bfff object.c: nested path const_defined?
* object.c (rb_mod_const_defined): support nested class path as
  well as const_get.  [Feature #7414]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 02:25:58 +00:00
nobu c74995b2af ChangeLog: fix commit miss
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 02:12:50 +00:00
nobu ae1a466401 object.c: fix r44189
* object.c (rb_mod_const_get): already interned junk name may be
  valid nested class path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 02:11:37 +00:00
nobu b2f9a0f5cb eval.c: reuse tag
* eval.c (rb_rescue2): reuse tags pushed for body proc to protect
  rescue proc too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 16:32:00 +00:00
tarui 71286e3770 * gc.c (wmap_final_func): Bugfix. Should update *value to new pointer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 16:19:49 +00:00
akr 4fd53e476e * ext/socket/lib/socket.rb: Don't test $! in "ensure" clause because
it may be set before the body.
  Reported by ko1 and mrkn.  [ruby-core:59088] [Bug #9247]

* lib/cgi/core.rb: Ditto.

* lib/drb/ssl.rb: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 16:11:12 +00:00
ngoto 42ae24a6e8 * internal.h (ruby_sized_xrealloc2): fix typo introduced in r44117, which cause compile error on Solaris.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 15:44:13 +00:00
nobu 26d147c733 thread.c: reduce tags and stack
* thread.c: (exec_recursive): use rb_catch_protect() instead of
  rb_catch_obj() and PUSH_TAG(), and reduce pushing tags and
  machine stack usage.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 15:22:18 +00:00
nobu b7c2f5bc93 proc.c: fix inherited owner
* proc.c (mnew_from_me): achieve the original defined_class from
  prepended iclass, to fix inherited owner.
* proc.c (method_owner): return the defined class, but not the
  class which the method object is created from.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 15:18:12 +00:00
nobu b71956d12b proc.c, vm_method.c: fix super and alias
* proc.c (method_owner): return the class where alias is defined, not
  the class original method is defined.
* vm_method.c (rb_method_entry_make, rb_alias): store the originally
  defined class in me.  [Bug #7993] [Bug #7842] [Bug #9236]
* vm_method.c (rb_method_entry_get_without_cache): cache included
  module but not iclass.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 13:29:23 +00:00
tmm1 3ba2006aa4 gc.c: GC.latest_gc_info reports most interesting major_by flag
* gc.c (gc_info_decode): Use :major_by=>:nofree as fallback reason
	  when other trigger conditions are present.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 07:30:33 +00:00
ko1 0aed7c6874 * error.c: add Exception#backtrace_locations.
Now, there are no setter and independent from Exception#backtrace.
  [Feature #8960]
* eval.c (setup_exception): set backtrace locations for `bt_location'
  special attribute.
* vm_backtrace.c (rb_backtrace_to_location_ary): added.
* internal.h: ditto.
* test/ruby/test_backtrace.rb: add a test for
  Exception#backtrace_locations.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 04:31:06 +00:00
ko1 c700511888 * gc.c (garbage_collect_body): use rb_bug() and explicit error message
instead of using assert().
  [Bug #9222]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 03:02:03 +00:00
ko1 3477670963 * array.c: fix comment to remove the word "shady".
* variable.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 02:53:27 +00:00
ko1 55a77f29c1 * gc.c: rename *shady* func/macros.
* RVALUE_RAW_SHADY()   -> RVALUE_WB_PROTECTED_RAW()
  * RVALUE_SHADY()       -> RVALUE_RAW_SHADY()
  * rgengc_check_shady() -> rgengc_check_relation().
  And fix some messages using "shady" to "non-WB-protected".



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 02:38:05 +00:00
drbrain d35e7b5be2 * lib/rubygems/request_set/lockfile.rb: Import RubyGems master a8d0669
with a 1.8.7 compatibility fix.
* test/rubygems/test_gem_request_set_lockfile.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 01:04:36 +00:00
drbrain 8fadbe5f3e * lib/rubygems: Update to RubyGems master ddac51f. Changes:
* Allow override for the shared gem installation directory for
    rubygems packagers.

  * Lock gem cache files for read and write to improve thread safety.

  * Use io/console when available.

  * Minor cleanup.

* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 00:51:04 +00:00
tmm1 c2dcb947aa object.c: use RCLASS_M_TBL_WRAPPER for equality checks
* class.c (include_modules_at): use RCLASS_M_TBL_WRAPPER for
  equality checks. this avoids an unnecessary deference inside a tight
  loop, fixing a performance regression from r43973.
* object.c (rb_obj_is_kind_of): ditto.
* object.c (rb_class_inherited_p): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-12 23:19:02 +00:00
mrkn f27509fd1a Append [ruby-core:50269] [Bug #7458] in the previous Changelog entry
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-12 17:08:26 +00:00
mrkn df33325192 * ext/bigdecimal/bigdecimal.c (VpSetPTR): fix for limitation of the resulting
precision.

* test/bigdecimal/test_bigdecimal.rb (test_limit): add tests for the above
   change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-12 17:02:27 +00:00
mrkn 7d3538db3f * ext/bigdecimal/bigdecimal.c (VpAddAbs): put out a conditional branch from
the inside of while-loop.

* ext/bigdecimal/bigdecimal.c (VpSubAbs): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-12 17:02:24 +00:00
mrkn 27d53fb5df * ext/bigdecimal/bigdecimal.c (VPrint): be a static function, support another
dump formats, and add more information of the given bigdecimal.

* ext/bigdecimal/bigdecimal.h: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-12 17:02:20 +00:00
ko1 919f1438ae * eval.c (rb_raise_jump): call c_return hook immediately after
popping `raise' frame.
  Patches by deivid (David Rodriguez). [Bug #8886]
* test/ruby/test_settracefunc.rb: catch up this fix.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-11 07:53:16 +00:00
ko1 78d7aa8ae3 revert r44133. See https://bugs.ruby-lang.org/issues/8886 details
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-11 07:41:14 +00:00
nobu 740535f843 hash.c: reject should return a plain hash
* hash.c (rb_hash_reject): return a plain hash, without copying
  the class, default value, instance variables, and taintedness.
  they had been copied just by accident.
  [ruby-core:59045] [Bug #9223]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-11 07:01:29 +00:00
tmm1 bd892d05ed compile.c: add opt_aset instruction for faster Hash#[]= and Array#[]=
* compile.c (iseq_specialized_instruction): emit opt_aset instruction
  to optimize Hash#[]= and Array#[]= when called with Fixnum argument.
  [Bug #9227] [ruby-core:58956]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-11 06:38:42 +00:00
ko1 a4cbd6412a * eval.c (rb_raise_jump): pop frame after setup exception.
Patches by deivid (David Rodriguez). [Bug #8886]
* test/minitest/test_minitest_unit.rb: catch up this change.
* test/ruby/test_backtrace.rb: ditto.
* test/ruby/test_settracefunc.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-11 03:39:52 +00:00
drbrain d6a5fe709e * lib/rubygems: Update to RubyGems master ec8ed22. Notable changes
include:

  * Renamed extension_install_dir to extension_dir (backwards
    compatible).

  * Fixed creation of gem.deps.rb.lock file from
    TestGemRequestSet#test_install_from_gemdeps_install_dir

  * Fixed a typo and some documentation.

* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10 19:54:19 +00:00