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

5450 Коммитов

Автор SHA1 Сообщение Дата
tenderlove db17d694ea * ext/psych/lib/psych/visitors/yaml_tree.rb: support dumping Encoding
objects.

* ext/psych/lib/psych/visitors/to_ruby.rb: support loading Encoding
  objects.

* test/psych/test_encoding.rb: add test

* ext/psych/lib/psych.rb: add version

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-01 02:09:53 +00:00
kazu 4f180097d3 use NUM2SIZET instead of NUM2INT
* ext/dl/dl.c (rb_dl_realloc): use NUM2SIZET instead of NUM2INT.

* ext/fiddle/fiddle.c (rb_fiddle_realloc): ditto.

* ext/dl/dl.c (rb_dl_malloc): use NUM2SIZET instead of NUM2INT.
  Coverity Scan found this bug.

* ext/fiddle/fiddle.c (rb_fiddle_malloc): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-25 14:18:13 +00:00
nobu 82eeaadc5d option.c: use rb_w32_inet_pton
* ext/socket/option.c (inet_pton): use rb_w32_inet_pton, instead of
  inet_ntop directly, which is unavailable on older version Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-23 03:18:56 +00:00
nobu 95be5381ec raddrinfo.c: suppress warnings
* ext/socket/raddrinfo.c (numeric_getaddrinfo): move conditionally
  used variables inside the block, to suppress warnings on platforms
  where inet_pton() is not available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-23 01:29:25 +00:00
usa 64904f51d7 * ext/io/console/console.c (console_dev): need read access for conout$
because some functions need it.  [Bug#9554]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-22 10:11:25 +00:00
akr a6da4b274d Fix a filename.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-22 04:02:43 +00:00
kazu fedc3a4b5f fix second argument of MEMZERO
* ext/socket/raddrinfo.c (rb_getaddrinfo): second argument of
  MEMZERO is type.  Coverity Scan found this bug.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-21 16:04:50 +00:00
shugo 139d06c34f * ext/socket/init.c (wait_connectable): break if the socket is
writable to avoid infinite loops on FreeBSD and other platforms
  which conforms to SUSv3.  This problem cannot be reproduced with
  loopback interfaces, so it's hard to write test code.
  rsock_connect() and wait_connectable() are overly complicated, so
  they should be refactored, but I commit this fix as a workaround
  for the release of Ruby 1.9.3 scheduled on Feb 24.
  [ruby-core:60940] [Bug #9547]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-21 14:59:44 +00:00
nobu 1f29e8e2ba class.c: do nothing if copying self
* class.c (rb_mod_init_copy): do nothing if copying self.
  [ruby-dev:47989] [Bug #9535]
* hash.c (rb_hash_initialize_copy): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-21 11:42:03 +00:00
normal d691a28d91 socket: sendmsg/recvmsg only retries blocking on errors
* ext/socket/ancdata.c (bsock_sendmsg_internal): only retry on error
  (bsock_recvmsg_internal): ditto
* test/socket/test_unix.rb: test above for infinite loop

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-21 00:55:13 +00:00
akr 81dfa8b397 * ext/socket/raddrinfo.c (numeric_getaddrinfo): Use xcalloc.
Suggested by Eric Wong.
  https://bugs.ruby-lang.org/issues/9525#note-14



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-20 13:22:44 +00:00
akr 2e6b97a45d * ext/socket: Bypass getaddrinfo() if node and serv are numeric.
Reporeted by Naotoshi Seo.  [ruby-core:60801] [Bug #9525]

* ext/socket/extconf.rb: Detect struct sockaddr_in6.sin6_len.

* ext/socket/sockport.h (SET_SIN6_LEN): New macro.
  (INIT_SOCKADDR_IN6): Ditto.

* ext/socket/rubysocket.h (struct rb_addrinfo): Add
  allocated_by_malloc field.

* ext/socket/raddrinfo.c (numeric_getaddrinfo): New function.
  (rb_getaddrinfo): Call numeric_getaddrinfo at first.
  (rb_freeaddrinfo): Free struct addrinfo properly when it is
  allocated by numeric_getaddrinfo.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-19 10:37:43 +00:00
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
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
nobu 6ef6dab36d ext/psych/yaml: suppress warnings
* ext/psych/yaml/emitter.c (WRITE_BREAK, PUT_BREAK): suppress
  unused-value warnings.

* ext/psych/yaml/parser.c, ext/psych/yaml/scanner.c: suppress
  unused-but-set-variable warnings.

* ext/psych/yaml/yaml_private.h (STACK_EMPTY): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-16 07:53:20 +00:00
nobu beb2d4c5a5 bigdecimal.c: refine macros
* ext/bigdecimal/bigdecimal.c (PUSH, SAVE): remove extra
  semicolons.

* ext/bigdecimal/bigdecimal.c (GUARD_OBJ): add parentheses and
  make an expression instead of a statement.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-16 07:53:18 +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
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 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
nobu 897a42b063 yaml/api.c: fix typo
* ext/psych/yaml/api.c (yaml_emitter_delete): fix typo 'empty'
  with 'emitter'.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-12 09:01:28 +00:00
nobu 4cac2f4ada bigdecimal.h: suppress warnings
* ext/bigdecimal/bigdecimal.h (VpSetZero, VpSetInf): get rid of
  unused-value warnings by gcc 4.9.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-12 02:25:28 +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
zzak bdeedccc5f * ext/tk/README.tcltklib: [DOC] Fix typo by @xta [Fixes GH-532] [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-11 08:02:01 +00:00
zzak 9699d0ddf4 * ext/ripper/lib/ripper/lexer.rb: [DOC] use lower case version of core
classes when referring to return value, since we aren't directly
  talking about the class. Patch by Jonathan Jackson [Bug #9483]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-07 12:57:44 +00:00
hsbt c6c6a74fed * ext/stringio/stringio.c: [DOC] add docs and example by @schneems [ci skip] [fix GH-527]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-06 03:08:38 +00:00
normal 2d603f9fee ext/thread: SizedQueue#max= wakes up waiters properly
* ext/thread/thread.c (rb_szqueue_max_set): use correct queue and
	  limit wakeups.  [Bug #9343][ruby-core:60517]
	* test/thread/test_queue.rb (test_sized_queue_assign_max):
	  test for bug

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-05 23:35:06 +00:00
ko1 d76b382683 * ext/objspace/objspace_dump.c (dump_object): use STR_SHARED_P()
instead of removed STR_NOCAPA_P() macro.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-05 05:41:04 +00:00
nobu 5c0d438fd3 * ext/psych/yaml/config.h (PACKAGE_VERSION): update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-05 01:17:31 +00:00
nobu 215b9e760a yaml/yaml_private.h: include ruby/extconf.h
* ext/psych/yaml/yaml_private.h: need ruby/extconf.h for
  HAVE_CONFIG_H.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-05 01:17:29 +00:00
nobu 990ba47c24 yaml/api.c, yaml/loader.c: integer overflow
* ext/psych/yaml/api.c (yaml_scalar_event_initialize): fix possible
  integer overflow.
  (yaml_document_add_scalar): ditto.
  (yaml_document_add_sequence): ditto.
   (yaml_document_add_mapping): ditto.

* ext/psych/yaml/loader.c (yaml_parser_load_scalar): ditto.
  (yaml_parser_load_sequence): ditto.
  (yaml_parser_load_mapping): ditto.

* ext/psych/yaml/scanner.c (yaml_parser_roll_indent): suppress
  warnigs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-05 01:17:28 +00:00
nobu 0483b29a8b yaml/emitter.c: constify, r37936
* ext/psych/yaml/emitter.c (yaml_emitter_write_indicator): constify.

* ext/psych/yaml/emitter.c (yaml_emitter_write_block_scalar_hints):
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-05 01:17:26 +00:00
nobu 1af28b7b7e * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-05 01:04:25 +00:00
tenderlove bfda9402a9 * ext/psych/lib/psych.rb: New release of psych.
* ext/psych/psych.gemspec: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-04 19:24:50 +00:00
tenderlove e8132aa4d7 * ext/psych/yaml/emitter.c: merge libyaml 0.1.5
* ext/psych/yaml/loader.c: ditto
* ext/psych/yaml/parser.c: ditto
* ext/psych/yaml/reader.c: ditto
* ext/psych/yaml/scanner.c: ditto
* ext/psych/yaml/writer.c: ditto
* ext/psych/yaml/yaml_private.h: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-04 19:18:01 +00:00
ko1 c77a745aab * string.c: remvoe STR_ASSOC related code.
By r44804, string objects can not have STR_ASSOC flag.
* internal.h: ditto.
* ext/objspace/objspace_dump.c (dump_object): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-04 07:12:49 +00:00
suke 7a2b7cf197 ext/win32ole/win32ole.c (ole_typedesc2val): add VT_RECORD case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-01 06:16:42 +00:00
normal cb07275001 socket: split out SOCK_CLOEXEC versions of wrappers for readability
* ext/socket/init.c (rsock_socket0): split out SOCK_CLOEXEC version
	* ext/socket/socket.c (rsock_socketpair0): ditto
	  [ruby-core:60377]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-31 08:06:19 +00:00
nobu d0a84c2ce9 socket.c: suppress warnings
* ext/socket/init.c (rsock_socket0): suppress unused label
  warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-31 07:08:52 +00:00
mame 995d330779 * ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value.
[ruby-core:57599] [Bug #8978].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-29 23:27:14 +00:00
nobu 0cee7f8e2f socket.c: suppress warnings
* ext/socket/socket.c (rsock_socketpair0): suppress unused label
  warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-29 02:04:16 +00:00
tenderlove e25f3587bd * ext/openssl/ossl_ssl.c: pass read_nonblock options to underlying IO
when SSL session has not been started.

* test/openssl/test_ssl.rb: test for change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-28 19:31:48 +00:00
tenderlove 2ee916752c * ext/fiddle/closure.c: use sizeof(*pcl) for correct sizeof value.
[ruby-core:57599] [Bug #8978].  Thanks mame!

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-28 18:53:23 +00:00
akr 965b947fff * ext/socket: Avoid redundant fcntl/fstat syscalls for cloexec
sockets.
  Patch by Eric Wong.  [ruby-core:59429] [Feature #9330]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-28 14:37:34 +00:00
zzak 5d83f5554f * ext/zlib/zlib.c (rb_zlib_adler32): [DOC] Add example for adler32
Patch by Vajrasky Kok [Bug #9307] [ci skip]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-28 06:13:50 +00:00
nobu 06d2e8aaf7 thread/thread.c: no dup
* ext/thread/thread.c (Init_thread): ConditionVariable and Queue
  are not able to copy.  [ruby-core:59961] [Bug #9440]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-22 06:59:41 +00:00
akr 3ffc7535ba Several more OS information for TYPE_IP_MULTICAST_LOOP and
TYPE_IP_MULTICAST_TTL.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-21 13:39:08 +00:00
nobu 6cfa67afe7 ext/socket/option.c: fix typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-20 22:52:17 +00:00
akr 8b5694d5e8 * ext/socket/option.c: Use "int" for IP_MULTICAST_LOOP and
IP_MULTICAST_TTL on Windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-20 19:35:11 +00:00
akr 779a630aee * ext/socket/option.c: Use "int" for IP_MULTICAST_LOOP and
IP_MULTICAST_TTL on Mac OS X.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-20 19:32:03 +00:00
akr 3682c6a327 * ext/socket/option.c: Use "byte" as default argument for
IP_MULTICAST_LOOP and IP_MULTICAST_TTL socket option to follow
  the original multicast implementation.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-20 15:43:47 +00:00
akr 3b8bcf42a7 * ext/socket/option.c: Use preprocessor macros to avoid repeated
conditionals.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-20 13:48:42 +00:00
nobu 5ecbe189af socket/option.c: helper functions
* ext/socket/option.c (sockopt_pack_byte, sockopt_pack_int):
  extract helper functions to pack integers in a String.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-19 14:56:05 +00:00
nobu 5c179cd66c socket/option.c: revert r44647
* ext/socket/option.c (NUM2SOCKOPT, sockopt_value): revert because
  these names are confusing.  [ruby-dev:47903]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-19 13:04:53 +00:00
nobu 41bdefd56f tracepoint.c: disable tracepoint
* ext/-test-/tracepoint/tracepoint.c (tracepoint_track_objspace_events):
  ensure tracepoint disabled.  [ruby-dev:47901] [Bug #9426]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-19 08:56:58 +00:00
hsbt 0558b8a5c4 * ext/psych/lib/psych.rb: fix typo by @jwworth [fix GH-500]
*  lib/rake/file_list.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-19 05:48:33 +00:00
hsbt d1ab866d4a * ext/nkf/nkf-utf8/nkf.c: fix typo by @windwiny [fix GH-506]
* ext/openssl/ossl_ssl.c: ditto
* ext/psych/yaml/scanner.c: ditto
* ext/socket/init.c: ditto
* ext/socket/socket.c: ditto
* ext/tk/tcltklib.c: ditto
* ext/win32ole/win32ole.c: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-19 05:43:23 +00:00
nobu 6282b3b5c3 socket/option.c: socket option variations
* ext/socket/option.c (NUM2SOCKOPT, sockopt_value): extract to wrap
  socket option variations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-19 01:11:01 +00:00
akr 971ef82267 * ext/socket: Avoid unnecessary ppoll/select on Linux.
Patch by Eric Wong.  [ruby-core:57950] [Bug #9039]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-18 14:13:22 +00:00
akr 7efaa4f5d0 [DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-18 12:44:36 +00:00
akr 57b2190d55 * ext/socket/option.c: IP_MULTICAST_LOOP and IP_MULTICAST_TTL socket
option takes a byte on OpenBSD.
  Fixed by Jeremy Evans.  [ruby-core:59496] [Bug #9350]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-18 12:31:57 +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
nobu cfa2a21062 ext/json: backward compatibilities
* ext/json/fbuffer/fbuffer.h, ext/json/generator/generator.c: add
  macros for backward compatibilities.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15 08:16:46 +00:00
nobu a1a237fb36 ext/fiddle: backward compatibilities
* ext/fiddle/function.c, ext/fiddle/pointer.c: add macros for
  backward compatibilities.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15 08:16:44 +00:00
nobu f5a12ac596 bigdecimal.c: rename macros
* ext/bigdecimal/bigdecimal.c (RB_OBJ_CLASSNAME): rename from CLASS_NAME().

* ext/bigdecimal/bigdecimal.c (RB_OBJ_STRING): for object itself.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15 08:16:33 +00:00
nobu 405ad52ad7 function.c: adjust indent
* ext/fiddle/function.c (parse_keyword_arg_i): adjust indent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15 08:16:32 +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
nobu 43d4148682 strscan.c: fix typo
* ext/strscan/strscan.c (inspect1): fix typo, rb_str_cat() instead
  of rb_str_cat2().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-14 03:23:20 +00:00
nobu 747e3c73e0 strscan.c: make string directly
* ext/strscan/strscan.c (inspect1): extract intermediate string from
  the buffer directly, like as inspect2.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-14 02:48:07 +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
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 23a8568739 openssl/ossl.h: calculate as long
* ext/openssl/ossl.h (ossl_str_adjust): calculate as long, not
  casting to int.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13 00:57:42 +00:00
nobu 74947c9d1e ext: use rb_sprintf() and rb_vsprintf() with PRIsVALUE
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13 00:57:41 +00:00
nobu eadaa8ba8b ext: use PRIsVALUE for rb_raise and rb_warn
* ext/bigdecimal/bigdecimal.c (BigDecimal_new): use PRIsVALUE for
  rb_raise() and rb_warn().
* ext/openssl/ossl_cipher.c (ossl_cipher_init): ditto.
* ext/racc/cparse/cparse.c (extract_user_token): ditto.
* ext/syslog/syslog.c (mSyslog_log): ditto.

* ext/openssl/ossl.h (OSSL_Check_Kind, OSSL_Check_Instance): now
  ossl_raise() also accepts PRIsVALUE.
* ext/openssl/ossl_asn1.c (ossl_asn1_default_tag):

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13 00:57:38 +00:00
nobu 7e9bd8f72c ext: real class name
* ext/dl/cptr.c (rb_dlptr_inspect): use real class name, not
  singleton class.

* ext/fiddle/pointer.c (rb_fiddle_ptr_inspect): ditto.

* ext/strscan/strscan.c (strscan_inspect): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13 00:57:36 +00:00
nobu 56e96b9f73 cptr.c: unused variable
* ext/dl/cptr.c (rb_dlptr_inspect): remove no longer used variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13 00:57:34 +00:00
nagai 738c298ce0 * ext/tk/extconf.rb: --with-tcllib and --with-tklib configure options
don't work correctly. Patch by jeremyevans0 (Jeremy Evans).
  [ruby-core:59483] [Bug #9348]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-12 09:04:06 +00:00
nobu 9bd672f668 ext: use rb_sprintf() and rb_vsprintf() with PRIsVALUE
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-12 08:11:36 +00:00
nobu 4240685237 stubs.c: library name strings
* ext/tk/stubs.c (ruby_open_tcl_dll, ruby_open_tk_dll): make library
  names by string literal concatenation at compilation time, not by
  sprintf() at runtime.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-12 08:11:34 +00:00
nobu 13e47e81d9 tcltklib.c: create_ip_exc format argument
* ext/tk/tcltklib.c (create_ip_exc): format argument must not be a
  dynamic string, not to contain unescaped %.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-12 08:11:32 +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
nobu 2b1c47dadc bigdecimal.c: expand buffer
* ext/bigdecimal/bigdecimal.c (BigMath_s_log): expand buffer size for
  64bit platforms.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-11 03:15:01 +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
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
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
nobu dc4922b89d tk/extconf.rb: rpath by libpathflag
* ext/tk/extconf.rb: use libpathflag method instead of dealing with
  rpath options directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-05 12:48:23 +00:00
nobu bd0ef220f0 ext/tk/extconf.rb: fix build error with tk variant
* ext/tk/extconf.rb: use -rpath linker option instead of -R, to
  fix build error with tk variant.  incorporate from MacPorts.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-04 12:10:20 +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
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
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
nobu e4518c5bde dbm.c: yield dup of keystr
* ext/dbm/dbm.c (fdbm_fetch): yield dup of keystr, to make it shared
  and get rid of use of uninitialized variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-01 18:43:13 +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 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 3e37a7f745 ossl.c: integer overflow
* ext/openssl/ossl.c (string2hex): fix signed integer overflow.
  [ruby-core:51711] [Bug #7744] [Fixes GH-242]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24 16:44:49 +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
a_matsuda 5cebf6d7a6 * ext/objspace/object_tracing.c: Fix typo in a variable name
s/registerd/registered/

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-17 11:18:47 +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
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
a_matsuda c0abb5e5c3 * ext/psych/yaml/emitter.c: Fix typo in the variable name
s/preceeded/preceded/

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-14 01:19:06 +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
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
a_matsuda 8920ac2972 * doc/contributing.rdoc: [DOC] Fix typo in comments by @dvsuresh [Fixes GH-475]
* ext/openssl/ossl_ssl.c: ditto.
* test/ruby/test_m17n.rb:  ditto.

https://github.com/ruby/ruby/pull/475
[ci-skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-12 07:21:19 +00:00
a_matsuda e1db3605fd * ext/win32ole/sample/olegen.rb: Fix typo
* ext/openssl/ossl_asn1.c:  [DOC] Fix typo
* lib/webrick/accesslog.rb:  ditto
* template/yarvarch.ja:  ditto

s/recieve/receive/

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-11 03:58:07 +00:00
hsbt 3d4ceaaa14 * ext/tk/lib/tkextlib/SUPPORT_STATUS: [DOC] remove link of RAA.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-11 03:36:03 +00:00
hsbt c2caf7d30f * ext/racc/cparse/README: [DOC] Use upstream and github link instead of RAA.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-11 03:10:54 +00:00
nobu 9a938987cb date_strptime.c: get rid of backtrack explosion
* ext/date/date_strptime.c (date__strptime_internal): unset
  case-insensitive flag for [:alpha:], which already implies both
  cases, to get rid of backtrack explosion.  [ruby-core:58984]
  [Bug #9221]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10 14:58:43 +00:00
nobu d5526f3fe5 openssl/digest.rb: check by lambda
* ext/openssl/lib/openssl/digest.rb (initialize): check argument
  size by lambda.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10 07:16:03 +00:00
nobu 0ede9926f7 openssl/digest.rb: get rid of deprecated class
* ext/openssl/lib/openssl/digest.rb (digest, hexdigest): create
  new instance and call on it directly, to get rid of deprecated
  class OpenSSL::Digest::Digest.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10 07:16:01 +00:00
tmm1 7170baa878 objspace_dump.c: include object's gc flags in dump
* ext/objspace/objspace_dump.c (dump_object): include fstring flag on
  strings. include gc flags (old, remembered, wb_protected) on all objects.
* ext/objspace/objspace_dump.c (Init_objspace_dump): initialize lazy
  IDs before first use.
* gc.c (rb_obj_gc_flags): new function to retrieve object flags
* internal.h (RB_OBJ_GC_FLAGS_MAX): maximum flags allowed for one obj
* test/objspace/test_objspace.rb (test_dump_flags): test for above
* test/objspace/test_objspace.rb (test_trace_object_allocations):
  resolve name before dump (for rb_class_path_cached)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-10 02:26:09 +00:00
drbrain 4f7c10f06f * ext/.document: Remove curses from documentable directories.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-09 21:16:19 +00:00
zzak 99e04c1345 * ext/openssl/lib/openssl/digest.rb: Deprecate OpenSSL::Digest::Digest
[Fixes GH-446] https://github.com/ruby/ruby/pull/446


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-09 19:56:45 +00:00
ktsj 2251a2729a * ext/thread/thread.c: [DOC] add call-seq alias for Queue#enq, #<<, etc.
* ext/thread/thread.c (Init_thread): use rb_define_alias instead of
  rb_alias to document alias.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-09 15:47:35 +00:00
shugo 9c5b2fd8aa * ext/curses, sample/curses: removed curses.
* NEWS: added an entry for the above change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-09 04:39:49 +00:00
nobu d3363a96df object_tracing.c: fix allocation from NEWOBJ hook
* ext/objspace/object_tracing.c (newobj_i): use cached class path
  only to get rid object allocation during NEWOBJ hook.
  [ruby-core:58853] [Bug #9212]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-09 03:26:07 +00:00
nobu 334294d0e2 date_parse.c: get rid of backtrack explosion
* ext/date/date_parse.c (parse_time): unset case-insensitive flag
  for [:alpha:], which already implies both cases, to get rid of
  backtrack explosion.  [ruby-core:58876] [Bug #9221]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-09 02:14:35 +00:00
drbrain d71eb3108c * ext/.document: Add syslog/lib and thread/thread.c to documentable
items.  [ruby-trunk - Bug #9228]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08 19:44:07 +00:00
mrkn 0727a22c69 * bigdecimal.c (BigDecimal_coerce): convert a Float to a BigDecimal instead
of converting the receiver to a Float.
  [ruby-core:58756] [Bug #9192]

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08 11:20:51 +00:00
tmm1 98a74d4dd5 parse.y: use rb_fstring() for strings stored in the symbol table
* parse.y (register_symid_str): use fstrings in symbol table
  [Bug #9171] [ruby-core:58656]
* parse.y (rb_id2str): ditto
* string.c (rb_fstring): create frozen_strings on first usage. this
  allows rb_fstring() calls from the parser (before cString is created)
* string.c (fstring_set_class_i): set klass on fstrings generated
  before cString was defined
* string.c (Init_String): convert frozen_strings table to String
  objects after boot
* ext/-test-/symbol/type.c (bug_sym_id2str): expose rb_id2str()
* test/-ext-/symbol/test_type.rb (module Test_Symbol): verify symbol
  table entries are fstrings

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08 01:39:27 +00:00
a_matsuda 7a9f701692 * ext/tk/lib/tk/canvas.rb: [DOC] Fix typo (s/paramter/parameter/)
* ext/tk/lib/tk/text.rb:  Ditto.
* ext/tk/lib/tkextlib/blt/component.rb:  Ditto.
* ext/tk/lib/tkextlib/blt/tree.rb:  Ditto.
* ext/tk/lib/tkextlib/blt/treeview.rb:  Ditto.
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb:  Ditto.
* lib/xmlrpc/server.rb:  Ditto.

[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-07 10:27:27 +00:00
mrkn 2308fb170e * ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec):
treat 0.0 and -0.0 of floating-point numbers specially for an optimization
  and to correctly propagate its signbit to the result.
  [Bug #9214] [ruby-core:58858]

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

* test/bigdecimal/test_bigdecimal_util.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05 16:34:59 +00:00
tmm1 6692436b9f ext/objspace: remove OS.after_gc_start_hook= and move internal test
* ext/objspace/gc_hook.c: remove this file
* ext/-test-/tracepoint/gc_hook.c: new filename for above
* ext/objspace/objspace.c: remove ObjectSpace.after_gc_start_hook=
* test/objspace/test_objspace.rb: remove test
* test/-ext-/tracepoint/test_tracepoint.rb: add above test for
  tracepoint re-entry

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05 09:24:02 +00:00
tmm1 393b9e65e9 gc.c: split GC_END event into GC_END_MARK and GC_END_SWEEP
* include/ruby/ruby.h: remove INTERNAL_EVENT_GC_END and replace with
  two new events: GC_END_MARK and GC_END_SWEEP
* gc.c (gc_after_sweep): emit GC_END_SWEEP after lazy sweep is done
* gc.c (gc_marks_body): emit GC_END_MARK at end of minor/major mark
* ext/-test-/tracepoint/tracepoint.c (struct tracepoint_track): tests
  for new events.
* test/-ext-/tracepoint/test_tracepoint.rb (class TestTracepointObj):
  ditto.
* NEWS: remove ObjectSpace.after_gc_*_hook. These are only a sample,
  and will be removed before ruby 2.1.
* ext/objspace/gc_hook.c: remove ObjectSpace.after_gc_end_hook=

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05 04:26:04 +00:00
drbrain e45f56d5db * ext/openssl/lib/openssl/buffering.rb: Return ASCII-8BIT strings from
SSLSocket methods.  [ruby-trunk - Bug #9028]
* test/openssl/test_ssl.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03 01:44:41 +00:00
zzak c4487ee06b * ext/openssl/lib/openssl/buffering.rb: Fix warning in copyright
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-01 02:58:50 +00:00
nobu e1a7f50ce6 win32ole.c: correct declaration
* ext/win32ole/win32ole.c (hash2named_arg): correct declaration to fix
  build failure.  a patch by phasis68 (Heesob Park) at
  [ruby-core:58710].  [Bug #9184]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30 09:05:48 +00:00
nobu 04ca48fc38 eval.c: determine exit status and signal before finalization
* eval.c (ruby_cleanup): determine exit status and signal to terminate
  before finalization, to get rid of access destroyed T_DATA execption
  object.  [ruby-core:58643] [Bug #9167]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30 08:46:41 +00:00
nobu dacc2c2436 vm_eval.c: blockarg
* vm_eval.c (rb_yield_block): implement non-nil block argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30 04:21:26 +00:00
nagai 07c15e8b10 * ext/tk/extconf.rb: show the reason of why ignore tclConfig.sh/tkConfig.sh.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30 02:46:47 +00:00
nagai b72256f91c * ext/tk/lib/tkextlib/tktable/tktable.rb: fix bug on arguments for Proc object.
* ext/tk/sample/scrollframe.rb: forgot a Module definition.

* ext/tk/extconf.rb: check unsupported version of tclConfig.sh/tkConfig.sh. It is because current Ruby/Tk doesn't support Tcl/Tk8.6.

* ext/tk/extconf.rb: change search step of Tcl/Tk libraries.

* ext/tk/lib/tk/namespace.rb: instance_exec() cannot accept a script string.

* ext/tk/lib/tk/msgcat.rb: bug fix on treating encodings. Now, ext/tk/sample/tkmsgcat-load_rb*.rb will work.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29 15:44:25 +00:00
nobu 7566c49068 ruby/ruby.h: RB_BLOCK_CALL_FUNC_ARGLIST
* include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): for declaration
  argument list of rb_block_call_func.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29 07:59:14 +00:00
a_matsuda da66677061 * lib/irb/notifier.rb: [Doc] Fix typo
* ext/json/lib/json/common.rb:  Ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 12:56:08 +00:00
tenderlove 599c3a9245 * ext/psych/lib/psych.rb: psych version 2.0.2
* ext/psych/psych.gemspec: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 22:14:34 +00:00
tenderlove 079ff69ca0 * ext/psych/lib/psych/scalar_scanner.rb: fix support for negative
years.
* ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
* test/psych/test_date_time.rb: test for change.
  Fixes: https://github.com/tenderlove/psych/issues/168

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 21:41:48 +00:00
tenderlove 725d6f4970 * ext/psych/lib/psych/scalar_scanner.rb: fix regexp for matching TIME
strings.
* test/psych/test_date_time.rb: test for change.
  Fixes: https://github.com/tenderlove/psych/issues/171

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 19:48:03 +00:00
nobu 94f01c55df should not ignore the rest of recursive constructs
* array.c (rb_ary_hash): should not ignore the rest of recursive
  constructs.
* hash.c (rb_hash_hash): ditto.
* range.c (range_hash): ditto.
* struct.c (rb_struct_hash): ditto.
* test/-ext-/test_recursion.rb (TestRecursion): separate from
  test/ruby/test_thread.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 17:20:16 +00:00
ko1 8ca8d7afb3 * ext/objspace/object_tracing.c (newobj_i): skip class_path if class
is frozen.
  rb_class_path() can modify frozen classes (and causes errors).
  This patch is temporary. We need no-modification/no-allocation
  class path function.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 10:26:41 +00:00
ko1 5b40cb6a2c * vm_trace.c: prohibit to specify normal events and internal events
simultaneously.
  I will introduce special care for internal events later.
* ext/-test-/tracepoint/tracepoint.c: test this behavior.
* test/-ext-/tracepoint/test_tracepoint.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 08:41:44 +00:00
tmm1 adcd0174b9 * ext/objspace/objspace_dump.c (dump_append_string_value): Escape
control characters for strict json parsers.
* ext/objspace/objspace_dump.c (objspace_dump): Document File/IO
  output option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 05:27:22 +00:00
nobu 78acdaca3c bigdecimal.gemspec: date
* ext/bigdecimal/bigdecimal.gemspec: revert Gem::Specification#date
  for snapshot/release tarballs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 01:57:55 +00:00
tmm1 302743d3e7 * NEWS: Add ObjectSpace.after_gc_{start,end}_hook=
* ext/objspace/objspace_dump.c: [DOC] catch up dump/dump_all to r43679

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-25 21:46:00 +00:00
zzak b514742374 * ext/bigdecimal/bigdecimal.gemspec: bump BigDecimal to 1.2.3 for
proper release date in RubyGems


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-25 05:35:18 +00:00
zzak a7925537d4 * ext/bigdecimal/bigdecimal.gemspec: Remove Gem::Specification#date
We should rely on rubygems to create the date the gem was released
  for each version.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-25 05:25:53 +00:00
tmm1 34176b023e * ext/objspace/objspace_dump.c: test fixes and win32 compatibility
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-24 00:22:19 +00:00
mrkn 10ca8a4b07 * ext/bigdecimal/bigdecimal.c (BigDecimal_power): Use FIX2LONG instead
of FIX2INT to avoid conversion error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-23 16:08:23 +00:00
mrkn b8bbc1a310 * ext/bigdecimal/lib/bigdecimal/math.rb (BigMath.E): Use BigMath.exp.
[Feature #6857] [ruby-core:47130]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-23 10:52:40 +00:00
mrkn b09f41587c exp
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-23 10:49:36 +00:00
mrkn 926960b01b * ext/bigdecimal/bigdecimal.c (BigDecimal_div2): The signature was
changed to allow us to pass arguments directly.

* ext/bigdecimal/bigdecimal.c (BigDecimal_div3): Added for the role of
  the old BigDecimal_div2.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-23 10:36:40 +00:00
mrkn 909d14a1db * ext/bigdecimal/bigdecimal.c (BigDecimal_power):
Round the result value only if the precision is given.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-22 13:31:26 +00:00
mrkn 4fb888211a * ext/bigdecimal/bigdecimal.gemspec: version 1.2.2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-22 08:07:43 +00:00
mrkn 15185e875d * ext/bigdecimal/bigdecimal.c (BigDecimal_data_type):
Use RUBY_TYPED_FREE_IMMEDIATELY only if it is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-22 08:05:58 +00:00
mrkn 2043bb5c34 * ext/bigdecimal/bigdecimal.c (BigDecimal_power): Round the result value.
[Bug #8818] [ruby-core:56802]

* test/bigdecimal/test_bigdecimal.rb: Add a test for the above fix.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-22 07:52:17 +00:00
mrkn 5ff5938120 * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Insert rb_thread_check_ints.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-22 05:55:45 +00:00
mrkn 467c9ec3b7 * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): Fix the inserting points
of RB_GC_GUARDs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-22 05:54:05 +00:00
mrkn 4131c29f87 * ext/bigdecimal/bigdecimal.c: Fix indentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-22 05:50:34 +00:00
nobu 5efbf8a44e * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-22 05:21:06 +00:00
naruse e103366645 * ext/nkf: merge nkf 2.1.3 2a2f2c5.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-22 05:16:54 +00:00
nobu e71bb2c54e openssl/buffering.rb: call super
* ext/openssl/lib/openssl/buffering.rb (OpenSSL::Buffering#initialize):
  initialize of a module should pass arguments to super.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-22 03:17:16 +00:00
mrkn b6f664686e * ext/bigdecimal/bigdecimal.c (VpAlloc): Fix the expr to adjust the size
of the digit array.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-21 12:42:01 +00:00
mrkn ff3e585014 * ext/bigdecimal/bigdecimal.c (BigDecimal_sqrt): Fix the precision of
the result BigDecimal of sqrt.
  [Bug #5266] [ruby-dev:44450]

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-21 12:37:46 +00:00
zzak 8a53b57584 * ext/digest/bubblebabble/bubblebabble.c: Teach RDoc digest/bubblebabble
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-21 07:53:39 +00:00
zzak f0dfcefa48 * ext/openssl/lib/openssl/buffering.rb: [DOC] Fix HEREDOC comment for
OpenSSL::Buffering which breaks overview because of RDoc bug


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-21 06:37:20 +00:00
zzak 1d8d8ff57f * ext/openssl/ossl_engine.c: [DOC] Documentation for OpenSSL::Engine
This patch is based off work by @vbatts in GH-436 completing the
  documentation for this class and its methods.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-21 04:37:14 +00:00
zzak 0c873e97da * ext/openssl/lib/openssl/buffering.rb: Remove unused arguments from
OpenSSL::Buffering.new [Fixes GH-445]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-21 01:46:48 +00:00
naruse 14cab32596 * ext/json: merge JSON 1.8.1.
002ac2771c...e09ffc0d7d
* Remove Rubinius exception since transcoding should be working now.
* Fix https://github.com/flori/json/issues/162 reported by Marc-Andre
  Lafortune <github_rocks@marc-andre.ca>. Thanks!
* Applied patches by Yui NARUSE <naruse@airemix.jp> to suppress
  warning with -Wchar-subscripts and better validate UTF-8 strings.
* Applied patch by ginriki@github to remove unnecessary if.
* Add load/dump interface to JSON::GenericObject to make
  serialize :some_attribute, JSON::GenericObject
  work in Rails active models for convenient
  SomeModel#some_attribute.foo.bar access to serialised JSON data.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-20 02:55:08 +00:00
nobu 28849ce257 ext/rbconfig/sizeof: move to an extension library
* common.mk, ext/rbconfig/sizeof: move RbConfig::SIZEOF to an
  extension library to get rid of annoying nmake VPATH rule.

* inits.c (rb_call_inits), miniinit.c (Init_sizes): RbConfig::SIZEOF
  is no loger built-in.

* template/sizes.c.tmpl (Init_sizeof): rename initialization function.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-18 14:19:16 +00:00
nobu 91aa8da578 objspace_dump.c: refine output
* ext/objspace/objspace_dump.c (dump_output): allow IO object as
  output, and use Tempfile.create and return open file instead of
  mkstemp() and path name for :file output.
  [ruby-core:58266] [Bug #9102]
* test/objspace/test_objspace.rb (TestObjSpace#dump_my_heap_please):
  remove temporary output file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-14 16:06:09 +00:00
nagachika 6cbe261626 * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] remove example of
Rational#to_d without argument. [Bug #8958]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-14 14:40:53 +00:00
zzak af5e21292c * ext/thread/thread.c: [DOC] This patch accomplishes the following:
- Teach RDoc about ConditionVariable
  - Teach RDoc about Queue
  - Teach RDoc about SizedQueue
  - Use fully-qualified namespace for Document-method
    This is necessary to separate definitions between classes
  - Fix rdoc bug in call_seq vs. call-seq
  - Correct doc for SizedQueue#pop patch by @jackdanger [Bug #8988]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13 17:37:47 +00:00
zzak 62d3853475 * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] +precision+ is required
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13 16:12:32 +00:00
nagachika 18358ad8cd Squashed commit of the following:
commit 6895f38bfc3c0ad6bd212b8f9acc3c71384dfcb7
Author: Chikanaga Tomoyuki <nagachika00@gmail.com>
Date:   Thu Nov 14 00:14:00 2013 +0900

    * ChangeLog: fix a typo at r43666

    * ext/openssl/ossl_asn1.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13 15:14:59 +00:00
zzak a369b7f7cb * ext/bigdecimal/lib/bigdecimal/util.rb: [DOC] Document the required
+precision+ argument for Rational#to_d [Bug #8958]
-This line, and those below, will be ignored--

M    ChangeLog
M    ext/bigdecimal/lib/bigdecimal/util.rb


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13 10:23:14 +00:00
zzak 4c1e390fa8 * ext/digest/*: [DOC] Fix several typos and broken http links.
Improved examples for Digest overview and fixed a broken example in
  Digest::HMAC overview. This patch also adds a description of
  Digest::SHA256.bubblebabble to the Digest overview.

  Patched by @stomar [Bug #9027]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13 10:09:28 +00:00
zzak 1dd8260dfa * ext/openssl/ossl_config.c: [DOC] Document the following:
- OpenSSL::ConfigError
  - OpenSSL::Config::DEFAULT_CONFIG_FILE

  Patched by @vbatts via GH-436
  https://github.com/ruby/ruby/pull/436


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13 09:34:08 +00:00
zzak 49a9845405 * ext/openssl/ossl_asn1.c: [DOC] Document parts of
OpenSSL::ASN1::ObjectId included a fix for the class overview, which
  previously showed the documentation for Constructive due to missing
  ObjectId overview. This patch also includes a note for Primative.

  Based on a patch by @vbatts via GH-436
  https://github.com/ruby/ruby/pull/436


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13 09:06:17 +00:00
zzak 75cef5054b * ext/openssl/lib/openssl/config.rb: In #parse use +string+ for +str+
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13 08:21:36 +00:00
zzak 33b63fcf93 * ext/openssl/lib/openssl/*.rb: [DOC] Document the following:
- Integer#to_bn
  - OpenSSL::Buffering module
  - Document deprecated OpenSSL::Digest::Digest compatibility class
  - OpenSSL::Config

  These changes were based on a patch by @vbatts via GH-436
  https://github.com/ruby/ruby/pull/436


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13 08:15:48 +00:00
nobu 2019f34bc9 io-console.gemspec: certification
* ext/io/console/io-console.gemspec: add a certification.
  http://www.benjaminfleischer.com/2013/11/08/how-to-sign-your-rubygem-cert/

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13 08:08:09 +00:00
tmm1 8f3934261a * internal.h: move common string/hash flags to include file.
* ext/objspace/objspace_dump.c: remove flags shared above.
* hash.c: ditto.
* string.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-11 09:39:13 +00:00
nobu 90b9996523 parse.y: remove "f" suffix [ruby-core:57966] [Feature #9042]
revert r42847 "test_string.rb: add test string encoding"

revert r42846 "parse.y: freeze in advance to reduce objects"

revert r42843 "parse.y: deduplicate frozen string literals"

revert r42780 "test_string.rb: yet another test"

revert r42779 "parse.y: valid suffix word only"

revert r42778 "test_string.rb: remove duplicated code"

revert r42775 "parse.y: force_encoding"

This reverts commit 93ea04ecec.

revert r42773 "Add frozen string literals"

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-10 06:13:02 +00:00
nobu 00dab76f20 objspace_dump.c: fix declaration
* ext/objspace/objspace_dump.c (dump_output): fix declaration,
  mkstemp() needs a writable buffer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09 13:34:53 +00:00
nari baf3cf128e * ext/objspace/object_tracing.c: use declarations in internal.h.
* ext/objspace/objspace.c: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09 12:00:04 +00:00
nobu 671707b546 objspace_dump.c: fix portability issue
* ext/objspace/objspace_dump.c (dump_output): fix portability issue.
  mkstemp() may not be available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09 06:16:58 +00:00
nobu 90feeb6ab9 objspace_dump.c: extract output option utilities
* ext/objspace/objspace_dump.c (dump_output, dump_result): extract
  output option utility functions from objspace_dump() and
  objspace_dump_all().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09 06:16:53 +00:00
nobu a50bbcfecb objspace_dump.c: suppress warnings
* ext/objspace/objspace_dump.c (dump_object): remove unused variables,
  and cast size_t to long.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09 06:16:48 +00:00
nobu b60079fe95 objspace_dump.c: indent
* ext/objspace/objspace_dump.c: adjust indent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09 06:16:42 +00:00
zzak c19118417e * ext/dl/cfunc.c: [DOC] fix typo in example [Bug #8944]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09 05:29:59 +00:00
tmm1 d0d6e2ecfa * ext/objspace/object_tracing.c: Add experimental methods to dump
objectspace as json: ObjectSpace.dump_all and ObjectSpace.dump(obj).
These methods are useful for debugging reference leaks and memory growth
in large ruby applications. [Bug #9026] [ruby-core:57893] [Fixes GH-423]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-08 17:06:55 +00:00
zzak 2cfdbd7d72 * ext/objspace/object_tracing.c: [DOC] trace_object_allocations_stop
By @srawlins [Fixes GH-421] https://github.com/ruby/ruby/pull/421


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-07 17:44:43 +00:00
tenderlove 9ae2651d19 * ext/psych/lib/psych/visitors/to_ruby.rb: process merge keys before
reviving objects. Fixes GH psych #168
* test/psych/test_merge_keys.rb: test for change
  https://github.com/tenderlove/psych/issues/168

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 19:15:40 +00:00