* parse.y (parser_tokadd_utf8): refine error message at bad char
in unicode escape, "invalid" instead of "unterminated".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Import Ruby/OpenSSL 2.0.0. The full commit history since 2.0.0 beta.2
(imported at r56098) can be found at:
https://github.com/ruby/openssl/compare/v2.0.0.beta.2...v2.0.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* enc/unicode.c: Add U+A64B to the special cases 03B9 and 03BC
at the end of onigenc_unicode_case_map (Bug #12990).
* enc/unicode/case-folding.rb: Add U+A64B to the special cases
03B9 and 03BC. Add a comment pointing to enc/unicode.c.
Change warnings to exceptions for unpredicted cases,
because this would have been more easily noticed
(the warning was not noticed when upgrading to Unicode 9.0.0).
* test/ruby/enc/test_case_comprehensive.rb: Remove temporary
exclusion of U+A64B from testing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Follow net/http and open-uri. Don't rely on the constants/methods from
OpenSSL::TestUtils.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Make test code independent of test/openssl/utils.rb. The development of
openssl library has moved to a separate repository and
OpenSSL::TestUtils may be modified at any time.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c (special_object_p): no longer raise a TypeError for
Integer and Float, and return itself instead. [Feature#12979]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c (rb_obj_clone2): no longer raise a TypeError for
special constants, and return itself instead. however, if
freeze option is false, raise an ArgumentError. [Feature#12979]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/enc/test_case_comprehensive.rb: fix test condition,
add a temporary check for U+A64B, the only character where the tests
currently fail. (Bug #12990)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Errno::ECONNRESET was raised by test_tls_post_connection_check and
test_tls_unknown_ca on mswin64 CI.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_keyword.rb (test_block_required_keyword): more
assertions for positional and require keyword parameters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The TLS handshake timeout can be specified independently, because the TLS
handshake doesn't start just after the underlying connection is established,
but after the AUTH command is completed. It's also useful for testing
purposes. However, if ssl_handshake_timeout is not specified, open_timeout
is used instead for convenience.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/net/ftp/test_ftp.rb (test_tls_connect_timeout): sleeping to give a chance of complete of accept is a timing issue at all. therefore, simply ignore the exception.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: Implement String#casecmp? and Symbol#casecmp? by using
String#downcase :fold for Unicode case folding. This does not include
options such as :turkic, because these currently cannot be combined
with the :fold option. This implements feature #12786.
* test/ruby/test_string.rb/test_symbol.rb: Tests for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/net/ftp/test_ftp.rb (test_tls_connect_timeout): get rid of a test error on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c (rb_obj_dup): no longer raise a TypeError for special
constants, and return itself instead. [Feature#12979]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c (rb_default_home_dir): resolve home directory from the
system database when HOME is not set. [Feature #12695]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* marshal.c (check_userdump_arg): marshal_dump should not return
an instance of the same class, otherwise it causes infinite
recursion. [ruby-core:78289] [Bug #12974]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fileutils/test_fileutils.rb (assert_output_lines): ensure
that write pipe is closed, not the reader thread to deadlock
when an exception raised in the given block.
[ruby-core:78053] [Bug #12910]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fileutils/test_fileutils.rb (TestFileUtils#setup): Use
primary group as well as supplementary groups. based on the
patch by Vít Ondruch at [ruby-core:78053]. [Bug #12910]
It might happen in certain environments (systemd-nspawn) that
process has no supplementary groups, but primary groups should be
enough to pass most of the tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Errno::EPROTOTYPE is sometimes raised on Mac OS X 10.10.
[ruby-core:78066] [Bug #12914]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
If the file system encoding is ISO-8851-1 or if the encoding of the target
string is invalid, don't encode to UTF-8. [ruby-core:78271] [Bug#12972]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Based on the patch by soleboxy.
[Fix GH-1478] [ruby-core:78240] [Feature #12965]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
SSLSocket#send is not defined, so use #write instead. flags and dest are
ignored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Because @sock.remote_address fails if @sock is an SSLSocket.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
If the :ssl options is specified, the control connection is protected with
TLS in the manner described in RFC 4217. Data connections are also
protected with TLS unless the :private_data_connection is set to false.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/logger.rb (Logger::LogDevice#initialize): calculate next
rotate time based on the mtime of the last existing file.
[ruby-dev:49881] [Bug #12948]
Author: Tsukasa Oishi <tsukasa.oishi@gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ordered.
* test/ruby/test_struct.rb: Ditto.
* test/ruby/test_thread.rb: Thread locals are not guaranteed to be
ordered.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* range.c (range_loader): check loading values if the data came
from an initialized range object. [ruby-core:78067] [Bug #12915]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_eval.c (vm_call0_body): refined module should not be skipped
as prepended. [ruby-core:78073] [Bug #12920]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ripper/test_files.rb (assert_parse_files): extract at least
one sample.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ripper/test_files.rb (assert_parse_files): separate tests
for each directories.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
On that machine, TestQueue#test_thr_kill often fails as follows:
1) Failure:
TestQueue#test_thr_kill [/home/hsbt/chkbuild/tmp/build/20161109T213002Z/ruby/test/thread/test_queue.rb:155]:
only 171/250 done in 30 seconds.
Even if it passes, it takes about 30 seconds:
[11160/16832] TestQueue#test_thr_kill = 29.80 s
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_process.rb (TestProcess#test_execopts_pgroup):
use dynamically assigned pid for the process group, instead of a
magic number 2. [ruby-core:78051] [Bug #12909]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ignore on Windows because we cannot handle signaled status of child
ruby process on this platform.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
send SIGKILL if the child process doesn't die within 1 second.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c (rb_mod_include, rb_mod_prepend): check if arguments are
given, as well as Kernel#extend. [ruby-dev:49854] [Bug #12887]
[Fix GH-1470]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test_make_socket_ipv6_multicast_hops): skip if IPv6 multicast
address is not available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
use Socket.tcp_server_sockets in case localhost is resolved to ::1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
toplevel, eval, and load to avoid SEGV when interrupted by SIGINT.
[ruby-core:76327] [Bug #12576]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/resolv.rb (Resolv::LOC::Coord.create): fixed.
[ruby-core:72567] [Bug #11912] fixed by Eric Wong and Kazuhiro
NISHIYAMA.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* time.c (vtm_add_offset): Fix yday on last day of year.
[ruby-core:72878] [Bug #11994] Fixed by Andrew White.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
in 1xx (HTTPInformation) also needs to continue. [Bug #12890]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/time.rb (make_time): "now" argument as nil works again.
This is broken since Ruby 2.2.
Mathieu Jobin pointed a problem.
e4b05d91eb (commitcomment-17421387)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/ipaddr.rb (IPAddr#==): If coercion fails, return false
instead of passing through the exception. [ruby-core:77451]
[Bug #12799]
* lib/ipaddr.rb (IPAddr#<=>): If coercion fails, return nil
instead of passing through the exception. [ruby-core:77451]
[Bug #12799]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c (flo_round, int_round): support round-to-nearest-even
semantics of IEEE 754 to match sprintf behavior, and add `half:`
optional keyword argument for the old behavior.
[ruby-core:76273] [Bug #12548]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/openssl/ut_eof.rb (OpenSSL::TestEOF): move TestEOF module
under OpenSSL to get rid of conflict with test/ruby/ut_eof.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/shellwords.rb (Shellwords#shellsplit): Fix the handling of
the backslash in double quotes to conform to the standard.
[ruby-core:63807] [Bug #10055]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/pathname/pathname.c (Pathname#empty?): New method.
[ruby-core:76404] [Feature#12596] Proposed by John Backus.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
add a test to check that alias in subclasses can be refined.
[ruby-core:69374] [Bug #11186]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/logger/test_logger.rb (test_datetime_format): suppress
warning when strftime called with empty format string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (cond0): !-operator is a method call, no warning for
literal in condition. [ruby-core:77801] [Bug #12881]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (iseq_compile_each): turn flip-flop in a not-operator
into a boolean value. fix up r56315
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_eval.c (vm_call0_body): follow the original class, not to
loop the prepended module. [ruby-core:77784] [Bug #12876]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/lib/test/unit.rb (Test::Unit::Parallel::Worker#to_s): show
file name if not idling.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c (rb_convert_to_integer): convert a fixable float to a
fixnum directly without the convesion method, as well as bignum
case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c (rb_convert_to_integer): should not drop the converted
string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c (mnew_internal): follow the original class, not to loop
the prepended module. [ruby-core:77591] [Bug #12832]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_thread.rb (test_thread_timer_and_interrupt):
count only signal handling time accurately without setup and
cleanup time.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/lib/test/unit.rb (Test::Unit::Parallel#deal): update the
job status after a task finished, to show idling workers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c (Init_Complex): undefine methods inherited from
Comparable, because Complex does not have <=> method.
[Bug #12866]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c (Init_Complex): undefine Complex#clamp, which does not
work like other Comparable methods, because Complex does not
have <=> method. patched by Tim Peters <zomg.tim AT gmail.com>
in [ruby-core:77720]. [Bug #12866]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_refinement.rb (test_symbol_proc): a Symbol is
converted to a Proc in the caller's context. [Feature #9451]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c (rb_hash_compact_bang): should return nil if no elements
is deleted. [ruby-core:77709] [Bug #12863]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dir.c (do_opendir): retry after GC when the limit for open file
descriptors reached.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_require.rb (test_loading_fifo_fd_leak): invoke GC
only when FDs exhausted to reduce the test time.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_refinement.rb (FooExtClient, FooExtClient2): no
needs to eval, using works in a class block now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_args.c (refine_sym_proc_call): search and call method with
refinements.
* vm_args.c (vm_caller_setup_arg_block): enable refinements when
enabled in the caller. [Feature #9451]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/optparse/kwargs.rb (OptionParser#define_by_keywords):
[EXPERIMENTAL] extract command line option definitions from the
information of keyword arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (copy_stream_body): use IO to write to copy to duplex IO.
http://twitter.com/knu/status/786505317974585344
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c (rb_hash_compact, rb_hash_compact_bang): Removes nil
values from the original hash, to port Active Support behavior.
[Feature #11818]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_array.rb (test_sort_bang_with_freeze): make a
clone to copy a <=> singleton method, instead of dup. which
element will be called is not predictable.
[ruby-core:76088] [Bug #12509]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.c (open_load_file): bind the open fd to an IO instance
before waiting FIFO, not to leak the fd if interrupted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/-test-/memory_status/memory_status.c: get memory sizes by
mach task_info system call.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/logger.rb (Logger::Period#next_rotate_time): fix monthly log
rotate when DST is applied during a month of 31 days.
[Fix GH-1458]
With DST the month of october can actually last more than 31 days.
It can last 31 days plus 1 hour. So during october, `t` used to be
equal to "2016-10-31 23:00:00" instead of "2016-11-01 00:00:00".
This was then normalized to "2016-10-01 00:00:00" which lead every
single line of log during october to rotate the log file.
This fix ensure that next_rotate_time(now, 'monthly') always return
the first day of next month in every situation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* load.c (rb_require_safe): SyntaxError created by the parser just
has the mesage and needs to set up the backtrace.
[ruby-core:77491] [Bug #12811]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* load.c (rb_load_internal0): load/require is not the main
script.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_io.rb (test_gets_rs): split for each record
separators.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_io.rb (test_ioctl_linux2): tty device may not
work on Docker.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/bigdecimal/bigdecimal.c (BigDecimal_div2): need more room
for precision to round. [ruby-core:77475] [Bug #12805]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_range.rb (test_range_bsearch_for_floats): test
all assertions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/rubygems.rb, lib/rubygems/*, test/rubygems/*: Update
rubygems to 2.6.7, not the master, with r56225.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c (rb_warning_s_warn): the argument must be an
ASCII-compatible string. [ruby-core:77430] [Bug #12793]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (symbol, dsym, parser_set_number_literal): set state to
ENDARG, so that `do` after a literal should be `do_block` and
bound to the outer method. [ruby-core:72482] [Bug #11873]
* parse.y (parse_ident): revert r56198.
* parse.y (warn_balanced): the state of symbol and numeric
literals is now EXPR_ENDARG, do not exclude it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_syntax.rb (test_warn_balanced): more assertions
for a symbol literal and a local variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
by default does the same thing it does currently
(rb_write_error_str). You can override Warning.warn to change
the behavior. [ruby-core:75016] [Feature #12299]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.c (iseqw_s_compile_file): deal with syntax error as well as
compile, and should not abort when rescued.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/stringio/stringio.c (strio_seek): Avoid signed integer overflow.
It's not harmful in practice here, but is still undefined behavior.
* ext/stringio/stringio.c (strio_extend): Check that the new length does
not exceed LONG_MAX. This fixes the invalid write on the overflow.
* test/stringio/test_stringio.rb (test_write_integer_overflow): Add a
test case for the above fix in strio_extend().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval_intern.h (TH_PUSH_TAG): Initialize struct rb_vm_tag::tag with
Qundef rather than 0 which is equal to Qfalse. Since Kernel#throw(obj)
searches a tag with rb_vm_tag::tag == obj, throw(false) can
accidentally find an unrelated tag which is not created by
Kernel#catch. [ruby-core:77229] [Bug #12743]
* test/ruby/test_exception.rb (test_throw_false): Add a test case for
this.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/-ext-/win32/test_dln.rb (test_check_imported): use toplevel
constants explicitly to get rid of constants under the scope.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/misc/test_ruby_mode.rb (assert_indent): since write-region
in Emacs 25.1 no longer displays the "Wrote file" message, shows
the explicit message to check if successfully finished.
[ruby-core:77355] [Bug #12785]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/misc/test_ruby_mode.rb (EXPR_SAVE): use a numeric prefix
argument of 0, not to make the previous version into a backup
file, instead of backup-inhibited.
* test/misc/test_ruby_mode.rb (run_emacs): always save the buffer
if modified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fileutils/test_fileutils.rb: use Dir.mktmpdir instead of
fixed name for temporary directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/-test-/win32/dln/{depend,extconf.rb} (dlntest.dll): make
under the extension directory, instead of the top directory.
* test/-ext-/win32/test_dln.rb (test_check_imported): explicit
PATH environment variable to load the DLL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (brace_body, do_body): preserve cmdarg_stack so that
`do` after cmdarg in a block should be `do_block` and bound to
the outer method. [ruby-core:72482] [Bug #11873]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: `do` after cmdarg in parentheses should be `do_block`
and bound to the outer method. [ruby-core:72482] [Bug #11873]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/openssl/test_ssl.rb (test_ctx_options): Fix test failure on
Ubuntu 16.04. The fix in r56147 was incomplete. This is a cherry-pick
of the commit b039f3e268c2 at ruby/openssl.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit changes full heap dumps back to using JSON lines format
(http://jsonlines.org) so that we can process very large heaps without
loading the entire heap in to memory at once.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
We shouldn't include the bad password in the URI exception output
message. Just knowing that there is a bad password is enough
information.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use Queue instead of a local variable for synchronization.
* join created thread to soleve leaking threads warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_set_len): The buffer overflow check is wrong. The
space for termlen is allocated outside the capacity returned by
rb_str_capacity(). This fixes r41920 ("string.c: multi-byte
terminator", 2013-07-11). [ruby-core:77257] [Bug #12757]
* test/-ext-/string/test_set_len.rb (test_capacity_equals_to_new_size):
Test for this change. Applying only the test will trigger [BUG].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/openssl/test_ssl.rb (test_ctx_options): Add a workaround for
patched OpenSSL to fix the Ruby CI failure on Ubuntu 16.04.
http://rubyci.s3.amazonaws.com/ubuntu/ruby-trunk/log/20160913T033003Z.fail.html.gz
This commit is a cherry-pick of the following commit at ruby/openssl:
f9c04779a8
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
with class method.
* test/uri/test_mailto.rb: Added tests for coverage.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/json/json_generator_test.rb (test_broken_bignum): get rid
of use of Bignum, obsolete name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c (rb_threadptr_raise): set cause from the called thread,
but not from the thread to be interrupted.
[ruby-core:77222] [Bug #12741]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c (rb_const_search): warn with the actual class/module
name which defines the deprecated constant.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* variable.c (rb_const_search): raise with the actual class/module
name which defines the private constant.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
because rb_class_of may return a singleton class.
[ruby-dev:49781] [Bug #12738]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* {ext,test}/openssl: Import Ruby/OpenSSL 2.0.0.beta.2. The full commit
history since v2.0.0.beta.1 can be found at:
https://github.com/ruby/openssl/compare/v2.0.0.beta.1...v2.0.0.beta.2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Module.used_refinements. based on the patch by Charlie
Somerville. [Feature #7418] [ruby-core:49805]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
if no block is given. [ruby-core:75346] [Feature #11058]
* test/csv/test_row.rb: add test for above.
* test/csv/test_table.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This version is mostly same as r56072. It contains to remove code
for Ruby 1.8
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS, {ext,test,sample}/openssl: Import Ruby/OpenSSL 2.0.0.beta.1.
ext/openssl is now converted into a default gem. The full commit
history since r55538 can be found at:
https://github.com/ruby/openssl/compare/08e1881f5663...v2.0.0.beta.1
[Feature #9612]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/lib/test/unit/assertions.rb (pend): Add an alias 'pend' for
'skip'. This is required for test-unit compatibility. In particular,
ext/openssl uses it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c (rb_ary_concat_multi): take multiple arguments. based
on the patch by Satoru Horie. [Feature #12333]
* string.c (rb_str_concat_multi, rb_str_prepend_multi): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/enc/test_regex_casefold.rb (setup): skip with error
message if CaseFolding.txt does not present, instead of printing
the message, which causes unknown command in parallel test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_fs_setter): check and convert $; value at
assignment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_split_m): show $; name in error message when it
is a wrong object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.c (Init_ISeq): undefine allocator of InstructionSequence,
to get rid of segfaults at method call on uninitialized object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_rand.rb (test_new_seed): refine probability of
failure from 1/256 to 1/256**8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c (num_funcall0, num_funcall1): get rid of infinite
recursion in fallback methods of Numeric.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_comparable.rb (TestComparable#test_clamp): fix
test. the result which is not clamped should be the receiver.
[Feature #10594]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (stmt, arg): rescue modifier in command op assignment
should be limited to rhs only. [ruby-core:75621] [Bug #12402]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c (rb_syntax_error_append): fix newline in syntax error
message to the beginning, not after file name and line number.
[Feature #11951]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Adapted from patch by Jabari Zakiya [#12665]
* test/test_prime.rb: Improve test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (command_asgn): rescue modifier in command assignment
should be limited to rhs only. [ruby-core:75621] [Bug #12402]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_objectspace.rb (test_finalizer_with_super):
adjust number of arguments to get rid of errors in a finalizer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/lib/test/unit.rb (Test::Unit::Parallel::Worker.launch):
disable verbose flag in worker processes, get rid of unexpected
output within marshaled results.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
SSL_write(3ssl) manpage has this in the WARNINGS section:
When calling SSL_write() with num=0 bytes to be sent the
behaviour is undefined.
And indeed, the new test case demonstrates failures when
empty strings are used. So, match the behavior of IO#write,
IO#write_nonblock, and IO#syswrite by returning zero, as the
OpenSSL::SSL::SSLSocket API already closely mimics the IO one.
* ext/openssl/ossl_ssl.c (ossl_ssl_write_internal):
avoid undefined behavior
* test/openssl/test_pair.rb (test_write_zero): new test
[ruby-core:76751] [Bug #12660]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c (env_enc_str_new): make string for an environment
variable name or value.
* hash.c (env_name_new): make environment value string with the
encoding for its name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c (env_assoc): the encoding of the value should be the
locale, as well as other methods, [], fetch, values, etc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (reg_fragment_enc_error): compile_error is different
between parser and ripper. [ruby-core:76397] [Bug #12651]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c (rb_obj_clone2): Allow Object#clone to take freeze:
false keyword argument to not freeze the clone.
[ruby-core:75017][Feature #12300]
* test/ruby/test_object.rb (TestObject): test for it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Implement non-ASCII case conversion for ISO-8859-2, by Yushiro Ishii.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/dtrace/helper.rb (DTrace::TestCase::READ_PROBES): wait
the spawned command not to make a waiter thread. fix up r55736.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Implement non-ASCII case conversion for Windows-1257, by Sho Koike.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Implement non-ASCII case conversion for Windows-1250, by Sho Koike.
* ChangeLog: Fixed order of previous two entries.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Implement non-ASCII case conversion for Windows-1251, by Shunsuke Sato.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Implement non-ASCII case conversion for Windows-1251, by Shunsuke Sato.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e