* test/thread/test_queue.rb (test_queue_with_trap): fix
portability. use SIGINT instead of SIGUSR2 which is supported
on not all platforms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
IMEMO objects have many types. Without this change, we cannot see what
types of IMEMO objects are being used when dumping the heap. Adding the
type to the IMEMO object will allow us to gather statistics about IMEMO
objects being used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Import Ruby/OpenSSL 2.0.3. Only bugfixes. The full commit log since
2.0.2 (imported at r57146) can be found at:
https://github.com/ruby/openssl/compare/v2.0.2...v2.0.3
----------------------------------------------------------------
Corey Bonnell (1):
Fix for ASN1::Constructive 'each' implementation
Kazuki Yamaguchi (10):
Fix build with static OpenSSL libraries on Windows
([ruby-core:78878] [Bug #13080])
Merge pull request #96 from CBonnell/master
Merge branch 'topic/windows-static-linking-without-pkg-config' into maint
appveyor.yml: update OpenSSL version to 1.0.2j
buffering: fix typo in doc
test/envutil: fix assert_raise_with_message
x509: fix OpenSSL::X509::Name#eql?
([ruby-core:79310] [Bug #13170])
ruby-openssl-docker: update versions of Ruby and OpenSSL
.travis.yml: test with Ruby 2.4
Ruby/OpenSSL 2.0.3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_sync.c: allow spurious wakeup to check Queue status just after trap.
[Bug #12405]
* test/thread/test_queue.rb: add a test for it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
strftime format strings which are dynamically-generated will benefit
from avoiding garbage, here.
* time.c (time_strftime): use rb_str_tmp_frozen_{acquire,release}
* test/ruby/test_time.rb (test_strftime_no_hidden_garbage): new test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_io.rb (test_closed_stream_in_rescue): run in a
separated process.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Format strings which are dynamically-generated will benefit
from this. This won't cover exceptions, but exceptions for
sprintf should be too uncommon to care about (unlike IO)
* sprintf.c (rb_str_format): use rb_str_tmp_frozen_{acquire,release}
* test/ruby/test_sprintf.rb (test_no_hidden_garbage): new test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
As with IO#write, IO#syswrite also generates garbage which can
be harmful in hand-coded read-write loops.
* io.c (swrite_arg, swrite_do, swrite_end): new
(rb_io_syswrite): use new functions to cleanup garbage
[ruby-core:78898] [Bug #13085]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Handle the embedded case first, since we may have an embedded
duplicate and non-embedded original string.
* string.c (rb_str_tmp_frozen_release): handled embedded strings
* test/ruby/test_io.rb (test_write_no_garbage): new test
[ruby-core:78898] [Bug #13085]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Because our tests now have several places where FIXNUM_MAX is needed,
we decided to provide it along with several other constants.
* template/limits.c.tmpl: new file, defining RbConfig::Limits
* ext/rbconfig/sizeof/depend (limits.c): rule to generate limits.c
* test/-ext-/num2int/test_num2int.rb: use RbConfig::Limits
* bootstraptest/test_insns.rb: ditto.
* .gitignore: ignore new generated file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/irb/test_ruby-lex.rb (test_prompt): invert confinue flag by
FIXME comments. adjust line numbers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/lib/leakchecker.rb (LeakChecker#find_tempfiles): get rid of
errors on uninitialized Tempfile, which can be left when
Dir.tmpdir failed or by Tempfile.allocate.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (io_close_fptr): notify then close, and wait for other
threads before free fptr. [ruby-core:79262] [Bug #13158]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c (setup_exception): make unfrozen copy of special
exception before setting up a cause.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c (special_object_p): uninterned Symbol also should not
raise a TypeError but return itself instead, as well as interned
Symbols. [ruby-core:79216] [Bug #13145]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/csv.rb (CSV#shift): the last column is an Array in extended
column since r55985. [ruby-dev:49964] [Bug #13149]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* random.c (InitVM_Random): rename Random.raw_seed to
Random.urandom. A quick search seems there are no practical use
of this method than securerandom.rb so I think it's OK to rename
but if there are users of it, this hunk is subject to revert.
* test/ruby/test_rand.rb (TestRand#test_urandom): test for it.
* lib/securerandom.rb (SecureRandom.gen_random): Prefer OS-
provided CSPRNG if available. Otherwise falls back to OpenSSL.
Current preference is:
1. CSPRNG routine that the OS has; one of
- getrandom(2),
- arc4random(3), or
- CryptGenRandom()
2. /dev/urandom device
3. OpenSSL's RAND_bytes(3)
If none of above random number generators are available, you
cannot use this module. An exception is raised that case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This seems a bug introduced by r520 (1.4.0). [ruby-core:79110] [Bug #13135]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (rb_parser_while_loop): should chomp but not chop by -l
option. [ruby-core:78099] [Bug #12926]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* class.c (rb_extract_keywords): keep the class of non-keyword
elements hash as the original. [ruby-core:77813] [Bug #12884]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/uri/generic.rb (URI::Generic#find_proxy): match IP address
no_proxy against resolved self IP address. [Fix GH-1513]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
StringIO.new makes the buffer IO.default_external, while
StringIO.new("".dup) makes source encoding which is defaulted to
UTF-8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/resolv.rb (Resolv::DNS::Message::MessageDecoder#get_rr):
re-raise an exception from decode_rdata as DecodeError, so it
can report them to the top in more informative way. It was not
reflecting on errors of data and thus breaking. Client code
expects `DecodeError` and knows how to handle broken messages.
[Fix GH-1511]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c (preface_dump, postscript_dump): CrashReporter directory
was used before Mac OS X 10.6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c (preface_dump, postscript_dump): moved from
rb_vm_bugreport to place the last important message at the very
last after [NOTE].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (append_compile_error): set Qtrue for erred state with
showing the message immediately.
* iseq.c (prepare_iseq_build): make immediate message mode if main
or top level context, not to show the failed path twice in the
first line.
* iseq.c (cleanup_iseq_build): raise default message exception if
immediate message mode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
BufferedIO#rbuf_fill should preserve backtrace information when raising
EOFError. Otherwise, users get confused when EOFError is leaked out from
Net::SMTP etc. [ruby-core:78550] [Bug #13018]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This allows "test-all" to pass on systems without multicast
support. I leave CONFIG_IP_MULTICAST unset in my Linux kernel
.config, nowadays.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
RUBY_PLATFORM is "x86_64-linux" on a 32-bit (x86) Ruby built and
running on a 64-bit Linux kernel. I also have a /lib64
directory nowadays because I just installed multi-arch support
in userspace. So, fall back to loading based in the size of a
packed "unsigned long" type instead of special-casing.
Tested with both x86 and x86_64 userspace on 64-bit Linux kernel,
as well as x86 with a 32-bit Linux kernel.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_enc_str_scrub): only one of replacement and block
is allowed. [ruby-core:79038] [Bug #13119]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_enc_str_scrub): yield the invalid part only with
ASCII-incompatible. [ruby-core:79039] [Bug #13120]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/io/console/test_io_console.rb (test_winsize): on old CentOS5
window size seems unable to be set across a pty.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Patch by Eric Wong [ruby-core:78797].
I don't like the idea of making insns.def any bigger to support
a corner case, and "test_hash_aref_fstring_identity" shows
how contrived this is.
[ruby-core:78783] [Bug #12855]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_io.rb (test_threaded_flush): use squiggly here
document to strip leading spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The `full` option includes all slots (even `T_NONE`) in the JSON output.
This is to help with debugging heap fragmentation.
Here is an example usage:
```ruby
File.open('heap.json', 'w') do |f|
ObjectSpace.dump_all(output: f, full: true)
end
```
The `heap.json` file contains all slots, including empty slots.
[Feature #13001] [ruby-core:78468]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The test case for String#unpack added by r57187 is not properly testing
because the String will be filled after the block invocation.
[ruby-core:78841] [Bug #13075]
Thanks to nagachika for pointing this out:
http://d.hatena.ne.jp/nagachika/20161226/ruby_trunk_changes_57184_57194#r57187
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c (read_num, read_rat_nos): dispatch by the type of numerator, for
mathn. [ruby-core:78893] [Bug #13084]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c (rb_int_fdiv_double): reduce first for more precise
result. [ruby-core:78886] [Bug #13078]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (argf_next_argv): fix leak of fd after breaking in #each
method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (io_fillbuf): fix race between read and close, in the case
the IO gets closed before the reading thread achieve the lock.
[ruby-core:78845] [Bug #13076]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_eval.c (yield_under): should evaluate the proc on the first
argument. [ruby-core:78839] [Bug #13074]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Fix unpacking with 'b', 'B', 'h' and 'H' format. Do not return an
uninitialized String to Ruby before filling the content bytes.
Fixes r11175 ("pack.c (pack_unpack): execute block if given with
unpacked value instead of creating an array", 2006-10-15).
[ruby-core:78841] [Bug #13075]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_enumerate_lines): in paragraph mode, do not
include newlines which separate paragraphs, so that it will be
consistent with IO#each_line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/lib/test/unit.rb (Test::Unit::RepeatOption): --repeat-count
option to repeat COUNT times while success.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/lib/test/unit/assertions.rb (prepare_syntax_check): extract
common preparation of arguments from assert_valid_syntax and
assert_syntax_error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/lib/test/unit/assertions.rb (assert_valid_syntax): use
RubyVM::InstructionSequence.compile to get rid of executing the
code, instead of catch&throw. sample/trick2015/kinaba/entry.rb
no longer raises an Invalid return.
* test/lib/test/unit/assertions.rb (assert_syntax_error): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/-ext-/string/test_modify_expand.rb (test_integer_overflow):
no longer happens on platforms where size_t is larger than long,
e.g. 64bit windows, since r57122.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_float.rb: add test cases for Float#round with
half nil. Follow up r57130.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* time.c (num_exact): show the original argument when conversion
failed, instead of intermediate nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c (exc_setup_cause): always set cause of cause to get rid
of circular references. [ruby-core:78688] [Bug #13043]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (iseq_compile_each): stop execution of the current source
by toplevel return. [ruby-core:36785] [Feature #4840]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c (rb_num_get_rounding_option): allow nil same as the
default behavior, per [ruby-core:77961]. [Bug #12548]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (argf_rewind): rewind line number in non-global ARGF
instance.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Follow r49675, r57098 and r57110. Don't assume RMatch::regexp always
contains a valid Regexp instance; it will be Qnil if the MatchData is
created by rb_backref_set_string(). [ruby-core:78741] [Bug #13054]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Shrinking the Array from the block invoked by Array#select! or
Array#reject! causes the Array to be a negative number size. Ensure that
the resulting Array won't be smaller than 0.
[ruby-core:78739] [Bug #13053]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Since the Array may be modified during rb_yield(), the length before
invoking the block can't be trusted. Fix possible out-of-bounds read in
Array#combination and Array#repeated_combination.
It may better to make a defensive copy of the Array, but for now let's
follow what Array#permutation does. [ruby-core:78738] [Bug #13052]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/lib/test/unit.rb (ExcludesOption#setup_options): add
separator for --excludes-dir in help message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* re.c (rb_reg_regsub): other than regexp has no name references.
[ruby-core:78686] [Bug #13042]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_heredoc_identifier): reject multiline here
document identifier, which never matches single line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (chomp_newline): fix chomping newline only line.
rb_enc_prev_char return NULL if no previous character and must
not call rb_enc_ascget on it. a patch by Ary Borenszweig
<asterite AT gmail.com> at [ruby-core:78666]. [Bug #13037]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fiddle/test_import.rb (LIBC.fprintf): VC14's `fprintf` is very distinct
name, then, just ignore this test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_enc_ascget() erroneously reports success even if the given byte
sequence is incomplete, for non-ASCII compatible encoding strings.
rb_enc_precise_mbclen() may return a negative value on error, and thus
rb_enc_ascget() must not store the return value in 'unsigned int';
otherwise the subsequent MBCLEN_CHARFOUND_P() check won't catch the
error. [ruby-core:78646] [Bug #13034]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_yyerror): show the error line even if the error
is at the end.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
`parser` refered RFC2396_Parser, but it is separated.
test is contributed by Dominik Menke
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_match_m_p): inverse of Regexp#match?. based on
the patch by Herwin Weststrate <herwin@snt.utwente.nl>.
[Fix GH-1483] [Feature #12898]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* re.c (rb_reg_match_m_p): consider char boundary. rb_str_subpos
does not adjust to the boundary if len == 0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (parser_tokadd_utf8): relax restriction to allow zero or
more codepoints.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/stringio/stringio.c (strio_getline): chomp CR not only LF,
as well as String#chomp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Import Ruby/OpenSSL 2.0.1. The full commit history since 2.0.0 (imported
at r56946) can be found at:
https://github.com/ruby/openssl/compare/v2.0.0...v2.0.1
This release contains only bug fixes. Note, the first two commits since
v2.0.0 are already imported at r56953 to make Travis and RubyCI green.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c (core_hash_merge): check the type of the target hash to
merge. [ruby-core:78536] [Bug #13015]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (ripper_initialize): allow generic input as source, if
it has #gets method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/lib/test/unit/assertions.rb (FailDesc): allow to defer
message generation, as well as other assertion methods.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
There is no need to call Utils.getservername when the :ServerName option is
specified, so delay Utils.getservername until needed to avoid unnecessary
DNS lookups. [ruby-core:78492] [Bug #13007]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c (rb_ary_sum): change the algorithm to Kahan-Babuska balancing
summation to be more precise.
[Feature #12871] [ruby-core:77771]
* enum.c (sum_iter, enum_sum): ditto.
* test_array.rb, test_enum.rb: add an assertion for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c (rb_num_get_rounding_option): fix exception message
for the case of nil rounding mode.
* test_float.rb: add an assertion for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e