* string.c (scan_once): fix the matched substring with `\K`, the
beginning of that string may differ from the matched position.
[ruby-core:86663] [Bug #14707]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/webrick/test_httpserver.rb (test_gigantic_request_header):
Errno::EPROTOTYPE is sometimes raised on Mac OS X 10.10.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Maybe this fixes some CI failures. Also, use different timeouts
for each item for hopefully easier diagnosis.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
r63236 (or r63237) introduces test failures and CI shows errors.
This commit makes skipping these tests. Please revert this commit
after tests (and rubyspec) work fine.
Failure log example:
https://gist.github.com/ko1/8456cf25fe35a696bd33ac86135092e4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The position should be counted for each nodeset but the previous
implementation counts position for union-ed nodeset.
For example, "/a/*/*[1]" should be matched to "<c1/>" and "<c2/>" with
the following XML.
<a>
<b>
<c1/>
</b>
<b>
<c2/>
</b>
</a>
But the previous implementation just returns only "<c1/>".
* lib/rexml/element.rb (REXML::Attributes#each_attribute):
Support Enumerator for no block use.
* lib/rexml/element.rb (REXML::Attributes#each):
Support Enumerator for no block use.
* lib/rexml/functions.rb (REXML::Functions.string):
Support NaN again.
* lib/rexml/xpath_parser.rb: Re-implement "Step" evaluator.
It should evaluate "AxisSpecifier", "NodeTest" and "Predicate" in one
step to respect position for each nodeset.
* test/rexml/test_jaxen.rb: Enable more tests. Remained tests should
be also enabled but it'll not be near future.
* test/rexml/xpath/test_base.rb: Fix expected value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
It doesn't mean that all elements which name "ELEMENT_NAME" with any
namespace URI including null namespace URI. It means that all elements
which name "ELEMENT_NAME" with null namespace URI.
https://www.w3.org/TR/1999/REC-xpath-19991116/#NT-NodeTest
> if the QName does not have a prefix, then the namespace URI is null
> (this is the same way attribute names are expanded).
We need to use "*[local-name()='#{ELEMENT_NAME}']" for all elements
which name "ELEMENT_NAME" with any namespace URI including null
namespace URI in XPath 1.0. But it's inconvenient. So this change
includes "*:#{LOCAL_NAME}" syntax support that is introduced since
XPath 2.0.
* lib/rexml/parsers/xpathparser.rb: Support "*:#{LOCAL_NAME}" syntax that
is introduced since XPath 2.0.
* lib/rexml/xpath_parser.rb:
* Fix namespace URI processing for "#{ELEMENT_NAME}". Now,
"#{ELEMENT_NAME}" doesn't accept elements with null namespace URI.
* Add "*:#{LOCAL_NAME}" support.
* test/rexml/test_contrib.rb,
test/rexml/test_core.rb,
test/rexml/xpath/test_base.rb: Follow this change.
* test/rexml/test_jaxen.rb: Fix namespace processing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
I can't reproduce the problem myself, but gets loop seems ought
to give more useful information for tracking down where we're
stuck, at least.
Followup-to: r63217
cf. http://ci.rvm.jp/results/trunk-test@frontier/804284
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
in r63225. Not strictly needed but to avoid confusion.
The JIT compiler itself seems working fine.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test/rexml/test_jaxen.rb: Fix wrong assert_raise usage. Note that this code
isn't used yet.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test/rexml/xpath/test_base.rb: Use here document for readability.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This is fairly non-intrusive bugfix to prevent children
from trying to reach into thread stacks of the parent.
I will probably reuse this idea and redo r62934, too
(same bug).
* vm_core.h (typedef struct rb_vm_struct): add fork_gen counter
* thread.c (rb_thread_atfork_internal): increment fork_gen
* variable.c (struct autoload_data_i): store fork_gen
* variable.c (check_autoload_data): remove (replaced with get_...)
* variable.c (get_autoload_data): check fork_gen when retrieving
* variable.c (check_autoload_required): use get_autoload_data
* variable.c (rb_autoloading_value): ditto
* variable.c (rb_autoload_p): ditto
* variable.c (current_autoload_data): ditto
* variable.c (autoload_reset): reset fork_gen, adjust indent
* variable.c (rb_autoload_load): set fork_gen when setting state
* test/ruby/test_autoload.rb (test_autoload_fork): new test
[ruby-core:86410] [Bug #14634]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* range.c (range_step): FIXABLE + FIXABLE never overflow, but may
not be FIXABLE. [Feature #12912]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
lib/rexml/parsers/xpathparser.rb: Ignore white spaces in relative
location path.
test/rexml/xpath/test_base.rb: Add more test patterns and use more
debug friendly assertion style.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test/rexml/xpath/test_base.rb: Use constant value for the expected value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test/rexml/xpath/test_base.rb: Expand loop assertion and stop to checking
just the first value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test/rexml/xpath/test_base.rb: Stop to use separated assertions for
checking array value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Typical usages:
```
p ary[1..] # drop the first element; identical to ary[1..-1]
(1..).each {|n|...} # iterate forever from 1; identical to 1.step{...}
```
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_dump): get rid of an error on evaling with
frozen-string-literal enabled. [ruby-core:86539] [Bug #14687]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (str_undump): check for suffix before if Unicode escape
conflicts with it. the message "but used force_encoding" sounds
strange when it is not used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/irb.rb (eval_input): restore the last error `$!`, as the
previous result. [Feature #14684]
* lib/irb/context.rb (evaluate): add `exception` keyword argument
to set the last error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c (nometh_err_initialize): do not shirtcut rb_call_super,
to push proper control frame. [ruby-dev:50522] [Bug #14670]
* error.c (rb_nomethod_err_new): allocate and initialize a new
NoMethodError instance.
* vm_eval.c (rb_make_no_method_exception): create a new exception
instance directly without method calls, to prevent influence of
ruby level method definitions, which can cause an unpredictable
behavior, e.g., infinite recursion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/marshaltestlib.rb (test_exception): use separate
clean object to raise an exception. TestCase instance often has
modules included.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (no_digits): return tINTEGER instead of unexpected
end-of-input, to get rid of extra error messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
For better failure message:
- by assert_operator: Expected "X" to be include? "Y"
- by assert_include: Expected "X" to include "Y"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (ibf_load_iseq_each): iseq_size necessary to encode
positions is set in ibf_load_code(). [Bug #14660]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
is always set. if `t` is nil, `NoMethodError` will be raised and the real
cause will be hidden.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
`Rational(int, bignum).to_f` sometimes returned a wrong result because
`Bignum#div` casted its divisor to double. [Bug #14637] [ruby-core:86330]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[Bug #14600]
* lib/rexml/xpath_parser.rb: Fix a bug that "/child::node()" returns
XML declaration and text nodes out of root element.
* test/rexml/test_jaxen.rb: Enable more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_bignum.rb (test_interrupt_during_to_s): should not use
"while" synchronization, but should use Queue.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[Bug #14600]
* lib/rexml/functions.rb: Fix a bug that "@attribute/parent" doesn't
return element of its attribute.
* test/rexml/test_jaxen.rb: Enable more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_fiber.rb (test_create_fiber_in_new_thread):
prefix to run, and get the result value not only waiting.
[Bug #14642]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[Bug #14600]
* lib/rexml/functions.rb: Fix a bug that "name(node-set)" returns
element instead of element name.
* test/rexml/test_jaxen.rb: Enable more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c (rb_threadptr_root_fiber_setup): divide into two functions:
* rb_threadptr_root_fiber_setup_by_parent(): called by the parent thread.
* rb_threadptr_root_fiber_setup_by_child(): called by the created thread.
`rb_threadptr_root_fiber_setup()` is called by the parent thread and
set fib->fib_handle by ConvertThreadToFiber() on the parent thread on
Windows enveironment.
This means that root_fib->fib_handle of child thread is initialized
with parent thread's Fiber handle. Furthermore, second call of
`ConvertThreadToFiber()` for the same thread fails.
This patch solves this weird situateion. However, maybe we can make more
clean code.
* thread.c (thread_start_func_2): call
`rb_threadptr_root_fiber_setup_by_child()` at thread initialize routine.
* vm.c (th_init): call `rb_threadptr_root_fiber_setup_by_parent()`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c (rb_obj_singleton_method): bail out if the receiver does
not have the singleton class without accessing the origin class
not to segfault. [Bug #14658]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c (rb_warn_m): prepend the string "warning: " if uplevel
keyword is given, even if caller file and line information are
not available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[Bug #14600]
Reported by MSP-Greg. Thanks!!!
* lib/rexml/xpath_parser.rb: Fix a bug that "following_siblings::*[N]"
doesn't work.
* test/rexml/test_jaxen.rb: Enable only axis test for now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_time_tz.rb (gen_variational_zdump_test): Update
Lisbon zdump data, which fixed the 1912-01-01 transition for
Portugual and its colonies. [Bug #14655]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_time_tz.rb (gen_zdump_test): fix the expected
data at the Kiritimati's skip of New Year's Eve 1994.
[Bug #14655]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_time_tz.rb (TestTimeTZ#test_pacific_kiritimati):
fix the expected data at the skip of New Year's Eve 1994.
[Bug #14655]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (compile_if): rewind callinfo indexes used in
unreachable paths, to get rid of dumping unused callinfos.
[ruby-core:86399] [Bug #14553]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c (rb_ary_collect): yield in block argument semantics
always to splat array elements to lambda, for the backward
compatibility. [ruby-core:86362] [Bug #14639]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dir.c (GlobPathValue): should be used in rb_push_glob only.
other methods should use FilePathValue.
https://hackerone.com/reports/302338
* dir.c (rb_push_glob): expand GlobPathValue
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Original patch by tenderlove (with minor style adjustments).
* lib/webrick/httpresponse.rb (send_header): call check_header
(check_header): raise on embedded CRLF in header value
* test/webrick/test_httpresponse.rb
(test_prevent_response_splitting_headers): new test
* (test_prevent_response_splitting_cookie_headers): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This is consistent with other implementations of .write
in openssl and stringio.
* io.c (io_write_m): return 0 on argc == 0
[ruby-core:86285] [Bug #14338]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Reading entire request or response bodies into memory can lead
to trivial denial-of-service attacks. Introduce Fibers in both
cases to allow streaming.
WEBrick::HTTPRequest gains a new body_reader method to prepare
itself as a source for IO.copy_stream. This allows the
WEBrick::HTTPRequest object to be used as the
Net::HTTPGenericRequest#body_stream= arg for Net::HTTP.
For HTTP proxy response bodies, we also use a Fiber to
to make the HTTP request and read the response body.
* lib/webrick/httprequest.rb (body_reader): new method
(readpartial): ditto
* lib/webrick/httpproxy.rb (perform_proxy_request): use Fiber
to stream response body
(do_GET, do_HEAD): adjust call
(do_POST): adjust call and supply body_reader
* test/webrick/test_httprequest.rb (test_chunked): test
for IO.copy_stream compatibility
* test/webrick/test_httpproxy.rb (test_big_bodies): new test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
No changes to the actual code, this is a new test for
a feature for which no tests existed. I don't understand
the Digest authentication code well at all, but this is
necessary for the subsequent change.
* test/webrick/test_httpauth.rb (test_digest_auth_int): new test
(credentials_for_request): support bodies with POST
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
While WEBrick::HTTPRequest#body provides a Proc interface
for streaming large request bodies, clients must not force
the server to use an excessively large chunk size.
* lib/webrick/httprequest.rb (read_chunk_size): limit each
read and block.call to :InputBufferSize in config.
* test/webrick/test_httpserver.rb (test_big_chunks): new test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
"BadRequest" alone does not resolve correctly, it is in the
HTTPStatus namespace.
* lib/webrick/httprequest.rb (read_chunked): use correct exception
* test/webrick/test_httpserver.rb (test_eof_in_chunk): new test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
We use the same 112 KB limit started (AFAIK) by Mongrel, Thin,
and Puma to prevent malicious users from using up all the memory
with a single request. This also limits the damage done by
excessive ranges in multipart Range: requests.
Due to the way we rely on IO#gets and the desire to keep
the code simple, the actual maximum header may be 4093 bytes
larger than 112 KB, but we're splitting hairs at that point.
* lib/webrick/httprequest.rb: define MAX_HEADER_LENGTH
(read_header): raise when headers exceed max length
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
We need to ensure we generate compatibile output in
the face of future changes
* test/webrick/test_filehandler.rb (test_make_partial_content):
check response body
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This is also compatible with range responses generated
by Rack::File (tested with rack 2.0.3).
* lib/webrick/httpresponse.rb (send_body_io): use Content-Range
* lib/webrick/httpservlet/filehandler.rb (make_partial_content):
use File object for the single range case
* test/webrick/test_filehandler.rb (get_res_body): use send_body
to test result
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/file.c (IS_ABSOLUTE_PATH_P): home directory should not be
a relative path regardless a drive letter. PathIsRelativeW
returns FALSE on such path. [ruby-core:86356] [Bug #14638]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_ensure is insufficient cleanup for fork and we must
reinitialize all waitqueues in the child process.
Unfortunately this increases the footprint of ConditionVariable,
Queue and SizedQueue by 8 bytes on 32-bit (16 bytes on 64-bit).
[ruby-core:86316] [Bug #14634]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
It fixed the several bugs that was found after RDoc 6 releasing.
From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_keyword.rb (test_splat_hash): assertion on
mandatory and rest arguments. r62914 is not only for optional
argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_args.c (setup_parameters_complex): [EXPERIMENTAL] warn when
splat keyword arguments is passed as a single ordinary argument,
not as a keyword rest argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (bodystmt): expand opt_else to show the error message at
the right place.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Now URI is normally UTF-8, and US-ASCII URI string is considered as
escaped a UTF-8 string.
https://github.com/rails/rails/issues/32294
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Improve code coverage and clarify meaning of hierarchical based on RFC
text.
[Fix GH-1846]
From: Xavier Riley <xavriley@hotmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (here_document): a continuing line is not the
terminator. [ruby-core:86283] [Bug #14621]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (tokadd_string): stop at continued line in dedented here
documents, to dedent for each lines before removing escaped
newlines. [ruby-core:86236] [Bug #14621]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_iseq.rb (test_to_binary_with_objects): disable
load_from_binary right now, r62851 seems having a trouble around
get_insn_info_succinct_bitvector() yet.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
For security reasons, File.read, File.binread, File.write, File.binwrite,
File.foreach, and File.readlines should not invoke external commands even
if the path starts with the pipe character |.
[ruby-core:84495] [Feature #14245]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (ibf_load_iseq_each): manage iseq_size to point loaded
objects in iseq_encoded. now marking iseq scans iseq_encoded
directly.
* test/ruby/test_iseq.rb (test_to_binary_with_objects): skip for
now, but fix argument order of assert_equal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (iseq_set_arguments): determine argument variable
indexes by the order, not by just IDs. arguments begin with `_`
can be duplicate, so by-ID index may result in a wrong value.
[ruby-core:86159] [Bug #14611]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62833 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
* 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
* 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
* lib/fileutils.rb: Add FileUtils#cp_lr. This method creates hard links
of each file from directory to another directory recursively.
This patch is based on Thomas Sawyers and Zachary Scott.
[Feature #4189] [ruby-core:33820]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval_error.c (print_errinfo): reset all attributes for each
lines before newlines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e