* range.c (range_last): return nil for empty range, or in the case the
predecessor is smaller than the begin. [Bug #8739]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/json/lib/json/add/range.rb (Range#as_json): use Range#end
instead of Range#last which can be affected by Range#exclusive?.
ref [Bug #8739]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/net/http/header.rb (Net::HTTPHeader#set_range): remove a hack
for the bug fixed at [Bug #8739].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(clear_rl_outstream, readline_s_set_input, clear_rl_instream)
(readline_readline): fix causing SEGV if closed IO object that is
set Readline.input or Readline.output. Patched by akr
[ruby-dev:47509] [Bug #8644]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* range.c (range_last): exclude the last number of the exclusive range
if the end is Numeric. [ruby-dev:47587] [Bug #8739]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (rb_w32_conv_from_wchar): converted string to CP_UTF8
should have UTF-8 encoding. otherwise no conversion takes place
later.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Stack overflow check should be done *after* pushing a stack frame.
However, some stack overflow checking codes checked *before*
pushing a stack frame with iseq->stack_max.
To solve this problem, add a new parameter `stack_max' to specify
a possible consuming stack size.
* vm_core.h (CHECK_VM_STACK_OVERFLOW0): add to share the stack overflow
checking code.
* insns.def: catch up this change.
* vm.c, vm_eval.c: ditto.
* test/ruby/test_exception.rb: add a stack overflow test.
This code is reported by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (rb_w32_conv_from_wchar): use WideCharToMultiByte(),
as like as mbstr_to_wstr(), in the first step of the convertion from
WCHAR.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
refienements in the eval string. [ruby-core:56329] [Bug #8722]
* test/ruby/test_refinement.rb: related test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_ellipsize): [DOC] fix typo, "encoding" instead of
"encoded" which is probably a slip of the auto-completion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
with regard to the shell and OS. Patched by Steve Klabnik [Bug #8550]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Based on a patch by @sho-h [Fixes GH-373]
https://github.com/ruby/ruby/pull/373
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (rb_w32_write_console): use MultiByteToWideChar() for
the last step of conversion to WCHAR, to get rid of warnings from
rb_enc_find() in miniruby. [ruby-dev:47584] [Bug #8733]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (wstr_to_mbstr, mbstr_to_wstr): fix wrong trimming.
WideCharToMultiByte() and MultiByteToWideChar() do not count
NUL-terminator in the size for conversion result, unless the input
length is -1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
pointer when len = 0 and pos outside of string. Bug #8728.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bignum.c (power_cache_get_power): declare as inline before call to
suppress warnings from gcc 4.2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
algorighms should check smaller argument because Karatsuba and Toom3
is effective only if both arguments are big.
(bary_mul_toom3_branch): Compare the smaller argument to
TOOM3_MUL_DIGITS.
(bary_mul): Compare the smaller argument to KARATSUBA_MUL_DIGITS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
BDIGIT array and size.
(big2str_karatsuba): Receive the number to stringize as BDIGIT array
and size. Use an temporary array of BDIGIT.
(rb_big2str1): Follow the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e