* 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
* 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
* 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
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
* 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
* 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
* 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
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
* 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
* 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
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
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
* 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
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
* 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
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
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
* 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
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
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
* 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
* 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
* 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
* 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
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
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
* 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
* 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
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
* 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
* 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
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
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
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
* 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
* 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
* 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
* 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
* 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
* 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
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
* 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
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
* 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
* 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
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
* 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
* 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
* 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
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
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
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
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
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
[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
* 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
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
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
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
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
* 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
- 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
+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
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
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
- 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
* 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
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