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

24334 Коммитов

Автор SHA1 Сообщение Дата
akr dd1c3a7509 * ext/socket: Wrap struct addrinfo by struct rb_addrinfo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-19 09:38:24 +00:00
akr 948ce9decb * ext/socket/ipsocket.c (ip_s_getaddress): Don't access freed memory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-19 08:51:33 +00:00
naruse 405a99b8a3 * configure.in: it must see rb_cv_broken_memmem not rb_cv_func_memmem.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-19 02:40:19 +00:00
hsbt 28b3d20ba9 * test/socket/test_socket.rb: unix socket is required by test case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-18 14:23:30 +00:00
hsbt 93156392dd * test/socket/test_addrinfo.rb: remove unused variables.
* test/socket/test_nonblock.rb: ditto.
* test/socket/test_socket.rb: ditto.
* test/socket/test_unix.rb: ditto.
* test/testunit/test_parallel.rb: ditto.
* test/webrick/test_filehandler.rb: ditto.
* test/xmlrpc/test_features.rb: ditto.
* test/zlib/test_zlib.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-18 12:05:09 +00:00
sorah da61291a25 * lib/test/unit.rb: Requires minitest < 5.0.0 if Gem is available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-18 05:28:00 +00:00
sorah 7c030a5ded * lib/test/unit/test-unit.gemspec: Add minitest < 5.0.0 dependency
* tool/rbinstall.rb: Add empty implementations for `add_dependency`,
  `add_runtime_dependency`, `add_development_dependency` for
  Gem::Specification.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-18 05:27:58 +00:00
akr bf6279bc2b * configure.in (FILE_COUNT): Removed. (win32.c defines it in itself.)
(FILE_READPTR): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-18 03:13:04 +00:00
hsbt 64d35eb621 * test/test/psych/test_string.rb: remove unused variables.
* test/test/psych/test_yaml.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-18 00:44:38 +00:00
ko1 131696f48f * test/ruby/test_gc.rb: ignore warning messages for running with -w
option such as chkbuild.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17 12:32:46 +00:00
akr 841bf2b208 * internal.h: Move BDIGIT and related definitions from
include/ruby/defines.h.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17 11:01:12 +00:00
nobu dd998dd561 marshal.c: do not recycle wrapper objects
* marshal.c (marshal_dump, marshal_load): do not recycle wrapper
  objects, to prevent from segfault with continuation.
  [ruby-dev:47970] [Bug #9523]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17 08:41:57 +00:00
zzak 2af43c6d4b * doc/keywords.rdoc: [DOC] Add keywords doc by documenting-ruby/ruby#29
https://github.com/documenting-ruby/ruby/pull/29 [ci skip]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17 06:46:17 +00:00
ko1 1aebaf7355 * gc.c (get_envparam_double): fix a warning message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17 03:33:03 +00:00
ko1 3ee0444955 * gc.c: introduce new environment variable
"RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR" to control major/minor GC
  frequency.
  Do full GC when the number of old objects is more than R * N
  where R is this factor and
                N is the number of old objects just after last full GC.
* test/ruby/test_gc.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17 03:27:13 +00:00
hsbt 1492277e3c * test/test_pty.rb: use underscore variables. because ignored unseued variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17 02:39:59 +00:00
hsbt 6f667c6460 * test/test_find.rb: remove unused variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17 02:39:58 +00:00
mrkn 260cdec9a9 * ext/bigdecimal/bigdecimal.c (BigDecimal_initialize): Insert GC guard.
* ext/bigdecimal/bigdecimal.c (BigDecimal_global_new): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-16 17:14:11 +00:00
hsbt 3efb36c25c * test/test_securerandom.rb: use File.exist? instead of File.exists?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-16 06:55:06 +00:00
hsbt 2e1d21f53c * test/pathname/test_pathname.rb: use File.exist? instead of File.exists?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-16 06:05:55 +00:00
hsbt 72191a0acd * test/net/ftp/test_ftp.rb: remove unused variables.
test/logger/test_logger.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-16 06:05:52 +00:00
normal 87661039e7 dir.c (dir_s_glob): RB_GC_GUARD instead of volatile
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-16 05:53:14 +00:00
akr 0bb75c4a71 * include/ruby/ruby.h (RBIGNUM_SIGN): Defined for compatibility.
(RBIGNUM_POSITIVE_P): Ditto.
  (RBIGNUM_NEGATIVE_P): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-16 05:34:48 +00:00
normal 10a8e87ce5 io.c (rb_f_backquote): trade volatile for manual recycle
* io.c (rb_f_backquote): trade volatile for manual recycle
  rb_gc_force_recycle ensures object is visible until recycle

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-16 04:19:29 +00:00
normal f97051512a marshal.c: use rb_gc_force_recycle for GC-safety
Putting rb_gc_force_recycle at the end of the function has a nice
side-effect of keeping wrapper visible to GC until the moment of
recycle, preventing GC from prematurely killing live objects.
volatile is a common source of compiler bugs/differences, avoid it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-16 03:45:15 +00:00
zzak 401cf928c1 * README.EXT.ja: [DOC] Fix typo by @utenmiki [Fixes GH-534] [ci skip]
https://github.com/ruby/ruby/pull/534


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-15 23:13:40 +00:00
akr 037ceae571 * ext/bigdecimal/bigdecimal.c (BIGNUM_ZERO_P): Unused macro removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-15 22:48:43 +00:00
akr 3c99764bcd * internal.h: Rename macro names: RBIGNUM_FOO to BIGNUM_FOO.
(BIGNUM_EMBED_LEN_NUMBITS): Renamed from RBIGNUM_EMBED_LEN_NUMBITS.
  (BIGNUM_EMBED_LEN_MAX): Renamed from RBIGNUM_EMBED_LEN_MAX.
  (BIGNUM_SIGN_BIT): Renamed from RBIGNUM_SIGN_BIT.
  (BIGNUM_SIGN): Renamed from RBIGNUM_SIGN.
  (BIGNUM_SET_SIGN): Renamed from RBIGNUM_SET_SIGN.
  (BIGNUM_POSITIVE_P): Renamed from RBIGNUM_POSITIVE_P.
  (BIGNUM_NEGATIVE_P): Renamed from RBIGNUM_NEGATIVE_P.
  (BIGNUM_EMBED_FLAG): Renamed from RBIGNUM_EMBED_FLAG.
  (BIGNUM_EMBED_LEN_MASK): Renamed from RBIGNUM_EMBED_LEN_MASK.
  (BIGNUM_EMBED_LEN_SHIFT): Renamed from RBIGNUM_EMBED_LEN_SHIFT.
  (BIGNUM_LEN): Renamed from RBIGNUM_LEN.
  (RBIGNUM_DIGITS): Renamed from RBIGNUM_DIGITS.
  (BIGNUM_LENINT): Renamed from RBIGNUM_LENINT.

* bignum.c: Follow the above change.

* gc.c: Ditto.

* marshal.c: Ditto.

* math.c: Ditto.

* numeric.c: Ditto.

* random.c: Ditto.

* rational.c: Ditto.

* sprintf.c: Ditto.

* ext/-test-/bignum/bigzero.c: Ditto.

* ext/-test-/bignum/intpack.c: Ditto.

* ext/bigdecimal/bigdecimal.c: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-15 21:17:34 +00:00
akr 7f27543b3b * configure.in (FILE_READEND): Don't detect it because it is not used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-15 11:49:37 +00:00
normal 54e4583d52 probes_helper.h (RUBY_DTRACE_HOOK): correct type for _id
* probes_helper.h (RUBY_DTRACE_HOOK): correct type for _id
  I want to experiment with uint32_t ID

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-15 04:23:33 +00:00
akr dfd26e3a47 * bignum.c (rb_big_cmp): Avoid bignum allocation for comparison
between bignum and fixnum.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-15 02:48:44 +00:00
shirosaki abb6b5073e fd_setsize/depend: fix wrong dependencies
* ext/-test-/win32/fd_setsize/depend: fix wrong dependencies.
  [ruby-dev:47253]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-15 01:59:40 +00:00
akr f526784e1e * enum.c: Enumerable#{min,min_by,max,max_by} extended to take an
optional argument.
  (nmin_cmp): New function.
  (nmin_block_cmp): Ditto
  (nmin_filter): Ditto.
  (nmin_i): Ditto.
  (nmin_run): Ditto.
  (enum_min): Call nmin_run if the optional argument is given.
  (nmin_max): Ditto.
  (nmin_min_by): Ditto.
  (nmin_max_by): Ditto.

* range.c: Range#{min,max} extended to take an optional argument.
  (range_min): Call range_first if the optional argument is given.
  (range_max): Call rb_call_super if the optional argument is given.

[ruby-core:57111] [Feature #8887]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-14 15:45:11 +00:00
akr ab9bc151e8 * include/ruby/ruby.h,
internal.h,
  ext/-test-/bignum/bigzero.c: Hide a Bignum definition.
  [ruby-core:42891] [Feature #6083]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-14 15:29:10 +00:00
akr 6f8b0e9bb0 * include/ruby/intern.h,
include/ruby/io.h,
  include/ruby/ruby.h,
  include/ruby/win32.h,
  include/ruby/backward/rubysig.h,
  bignum.c,
  gc.c,
  io.c,
  process.c,
  safe.c,
  struct.c,
  thread.c,
  ext/socket/rubysocket.h,
  ext/-test-/old_thread_select: Remove deprecated definitions
  [ruby-core:60581] [Feature #9502]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-14 15:16:31 +00:00
normal f7cff3a940 string.c (rb_str_format_m): trade volatile for RB_GC_GUARD
* string.c (rb_str_format_m): trade volatile for RB_GC_GUARD
  RB_GC_GUARD meaning is clear and has better code generation.
  [ruby-core:60688]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-14 09:42:14 +00:00
usa 4e3522e9fb * Changelog: I hope that "ue" is the right replacement of "u-umlaut". it was
removed at r44587 because it was not included in us-ascii.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-14 06:39:06 +00:00
shugo 4d33c0e965 * vm_insnhelper.c (vm_call_method): should check ci->me->flag of
a refining method in case the method is private.
  [ruby-core:60111] [Bug #9452]

* vm_method.c (make_method_entry_refined): set me->flag of a refined
  method entry to NOEX_PUBLIC in case the original method is private
  and it is refined as a public method.  The original flag is stored
  in me->def->body.orig_me, so it's OK to make a refined method
  entry public.  [ruby-core:60111] [Bug #9452]

* test/ruby/test_refinement.rb: related tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-13 14:44:41 +00:00
normal 518ab3832d re.c (rb_reg_raise): remove volatile
* re.c (rb_reg_raise): remove volatile
  Unnecessary since r41597

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-13 09:40:03 +00:00
normal 9c4d2d79f3 re.c (rb_reg_regcomp): remove volatile
* re.c (rb_reg_regcomp): remove volatile
  Unnecessary since r13261

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-13 09:36:40 +00:00
zzak dc853e330b * test/ruby/test_array.rb: Ensure flatten! is used for test_flatten
Patch by @ksss [Fixes GH-530] https://github.com/ruby/ruby/pull/530


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-13 07:55:34 +00:00
nobu 5b56c1c42b parse.y: attrset from junk ID
* parse.y (IDSET_ATTRSET_FOR_INTERN): fix off-by-one bug.
* parse.y (rb_enc_symname_type): junk ID succeeded by '=' is also
  attrset ID.  [ruby-core:60668] [Bug #8756]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-13 06:43:18 +00:00
nobu bb7ae984f8 configure.in: use pthread_setname_np only if available
* configure.in: check if pthread_setname_np is available.
* thread_pthread.c: pthread_setname_np is not available on old
  Darwins.  [ruby-core:60524] [Bug #9492]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-13 02:06:36 +00:00
kazu 75e1b5c845 fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-13 00:15:47 +00:00
glass 6cb5dc55bd * configure.in: revert r44922. I should have used AC_CHECK_FUNCS()
to just define a symbol if the function is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-12 16:04:05 +00:00
glass 353fcc27d1 * configure.in: use AC_CHECK_FUNC instead of AC_CHECK_FUNCS
if available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-12 15:24:33 +00:00
glass d6203c933e * configure.in: fix to undefine HAVE_MEMEM collectlly if it is broken.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-12 15:17:13 +00:00
akr 09e6766d1a * ext/bigdecimal/bigdecimal.c (BigMath_s_log): Use rb_big_cmp instead of
RBIGNUM_NEGATIVE_P.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-11 14:55:37 +00:00
akr c1de2f4e3a * bignum.c (rb_big_cmp): Specialize a comparison to zero.
* ext/bigdecimal/bigdecimal.c (is_negative): Use rb_big_cmp instead of
  RBIGNUM_NEGATIVE_P.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-11 14:43:23 +00:00
akr ab67419b75 * ext/openssl/ossl_bn.c (ossl_bn_initialize): Use rb_integer_pack.
Fix SEGV by OpenSSL::BN.new(1 << (2**34)).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-11 14:06:51 +00:00