* compile.c (ibf_dump_align): resize the dump buffer.
rb_str_modify_expand expands the buffer but not set the length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
It can be specified from 2.0. Ref: https://bugs.ruby-lang.org/issues/7103
[Fix GH-1841]
From: yuuji.yaginuma <yuuji.yaginuma@gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (ibf_dump_align): expand the buffer for alignment.
* compile.c (ibf_dump_iseq_list, ibf_dump_object_list): align as
ibf_offset_t. not all processors do not allow unaligned word,
or larger, access.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/transform_mjit_header.rb (MJITHeader.check_code): read
output and errors than discarding errors. also cl.exe prints
the source file name which is a garbage at this time.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Sometimes test hangs in `mjit_get_iseq_func` like this:
http://ci.rvm.jp/results/trunk-test@ruby-sky3/659391
It seems that a process waiting in `mjit_get_iseq_func` does no longer
have MJIT worker thread. We don't wait for JIT finish forever. So I
added timeout for the case. I'm not sure why there was no MJIT worker
thread in ruby-sky3 test process though.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* re.c (rb_reg_str_with_term): change terminator.
* re.c (rb_reg_s_union): terminator in source string does not need
to be escaped. terminators are outside of regexp source itself.
[ruby-core:86149] [Bug #14608]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_iseq.rb (test_to_binary_with_objects): #to_binary
does not support iseq compiled with coverage, just skip.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* the default value of URI::File's authority is "" (localhost).
Both nil and "localhost" is normalized to "" by default.
* URI::File ignores setting userinfo and port
[Feature #14035]
fix https://github.com/ruby/ruby/pull/1719
fic https://github.com/ruby/ruby/pull/1832
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.ac (rb_cv_gcc_compiler_cas): do not use one variable
for multiple AC_CACHE_CHECK. in one check, select by different
values.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_split_m): yield each split substrings if the
block is given, instead of returing the array. [Feature #4780]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Support `exception:` keyword argument in `Kernel#Complex()`.
If `exception:` is `false`, `Kernel#Complex()` returns `nil` if the given
value cannot be interpreted as a complex value.
The default value of `exception:` is `true`.
This is part of [Feature #12732].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Support `exception:` keyword argument in `Kernel#Rational()`.
If `exception:` is `false`, `Kernel#Rational()` returns `nil` if the given
value cannot be interpreted as a rational value.
The default value of `exception:` is `true`.
This is part of [Feature #12732].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Support `exception:` keyword argument in `Kernel#Float()`.
If `exception:` is `false`, `Kernel#Float()` returns `nil` if the given
value cannot be interpreted as a float value.
The default value of `exception:` is `true`.
This is part of [Feature #12732].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Support `exception:` keyword argument in Kernel#Integer().
If `exception:` is `false`, `Kernel#Integer()` returns `nil` if the given
value cannot be interpreted as an integer value.
The default value of `exception:` is `true`.
This is part of [Feature #12732].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_io.rb: use SIGUSR2 instead of SIGUSR1 to confirm
unknown SIGUSR1 exception. On parallel testing, sometime
(1 per some days) SIGUSR1 exception. This fix will make clear which
signal is a suspect.
http://ci.rvm.jp/results/trunk-test@ruby-sky3/643893
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
`TRACE_INSN_P` doesn't need to know about encoded iseqs, it just needs
to look at decoded iseqs. We have the decoded iseqs available, so no
reason to look at encoded ones. This change allows us to clear
`original_iseq` from the iseq struct without any segvs (previously,
clearing `original_iseq` would cause the tests to crash).
* iseq.c (rb_iseq_trace_set): Only use decoded iseq with `TRACE_INSN_P`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.ac: basic libraries like -lm are necessary for some
extension libraries on some platforms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_weakmap.rb (test_include?): create and release
the object to be garbage-collected in deeper frame.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Currently `Ripper.slice` raises a FrozenError
```ruby
require 'ripper'
p Ripper.slice('foo', 'ident')
```
```
/path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:193:in `concat': can't modify frozen String (FrozenError)
from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:193:in `block in compile'
from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:190:in `scan'
from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:190:in `compile'
from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:169:in `initialize'
from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:151:in `new'
from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:151:in `token_match'
from /path/to/g/lib/ruby/2.6.0/ripper/lexer.rb:144:in `slice'
from /tmp/tmp.kb4cnhvum2/test.rb:2:in `<main>'
```
This patch will fix the problem.
[Fix GH-1837]
From: Masataka Pocke Kuwabara <kuwabara@pocke.me>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e