This reverts commit r61309
Because it was unstable on mswin CI.
[ruby-dev:50370][Bug #14203]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* st.c (_st_table_list, _st_table_pool): symbols beginning with an
underscore and a lower letter are preserved by the standard.
* st.c (get_st_table): protoized.
* st.c (st_insert_generic): adjust local variable type to an
argument argc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
It version changed fallback option to keywoad argument
on `Yaml.load` method. It break backword compatiblity.
see detailed discuttion: https://github.com/ruby/psych/issues/340
From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
But we couldn't ship strscan (and stringio) gem. Because rubygems.org
still masked them.
https://github.com/rubygems/rubygems.org/pull/1696
I'm going to ship them after it deployed.
From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
It needs to support header file installation and uninstallation.
But current RubyGems didn't support it feature yet.
From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (compile_array): pop splat result without creating a
new hash if the whole hash is popped.
[ruby-core:84340] [Bug #14201]
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
When doing the difference of a small array with a big one it is not
efficient in both time and memory to convert the second one to a hash.
From: Ana María Martínez Gómez <ammartinez@suse.de>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (compile_array): splat which may have side effects
should be compiled even if the result will be popped.
[ruby-core:84340] [Bug #14201]
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* addr2line.c: Because stdbool.h is a C99 feature, compile error
occurs with some old compilers without specifying C99 options.
Fix compile error with Oracle Solaris Studio 12.4 on Solaris 10.
[Bug #14200] [ruby-dev:50366]
* missing/stdbool.h: Alternative of stdbool.h for C89 compilers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval_error.c (write_warn, write_warn2, write_warn_str): Fix compile
error "operands have incompatible types" with Oracle Solaris Studio
12.4 on Solaris 10.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (rb_io_open_generic): try to open the named file as usual,
if klass is not IO nor File, so that Errno::ENOENT will be
raised probably. calling on File will be same in the future.
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (rb_io_open_generic): when external command will be invoked
as other than IO singleton method, probably unintentionally,
warn if it is File or raise ArgumentError.
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/lib/envutil.rb (verbose_warning): flush is called on STDOUT
and STDERR sometimes.
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (open_key_args): open by rb_io_open always also when
open_args: option is given.
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Before this change, coverage.so had failed to measure some multiple-line
code fragments. This is because removing trace instructions (#14104)
changed TracePoint's lineno (new lineno), and coverage counter array was
based on old lineno.
This change initializes coverage counter array based on new lineno.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
When generate Hash object, the heap area of st_table will be always allocated in internally
and seems it take a time.
To improve performance of creating Hash object,
this patch will reduce count of allocating heap areas for st_table by reuse them.
Performance of creating Hash literal -> 1.53 times faster.
[Fix GH-1766] [ruby-core:84008] [Feature #14146]
### Environment
* OS : macOS 10.13.1
* CPU : 1.4 GHz Intel Core i7
* Compiler : Apple LLVM version 9.0.0 (clang-900.0.39)
### Before
$ ./miniruby -v -I. -I../benchmark-ips/lib ~/tmp/bench/literal.rb
ruby 2.5.0dev (2017-11-28 hash 60926) [x86_64-darwin17]
Warming up --------------------------------------
Hash literal 51.544k i/100ms
Calculating -------------------------------------
Hash literal 869.132k (± 1.1%) i/s - 4.381M in 5.041574s
### After
$ ./miniruby -v -I. -I../benchmark-ips/lib ~/tmp/bench/literal.rb
ruby 2.5.0dev (2017-11-28 hash 60926) [x86_64-darwin17]
Warming up --------------------------------------
Hash literal 63.068k i/100ms
Calculating -------------------------------------
Hash literal 1.328M (± 2.3%) i/s - 6.685M in 5.037861s
### Test code
require 'benchmark/ips'
Benchmark.ips do |x|
x.report "Hash literal" do |loop|
count = 0
while count < loop
hash = {foo: 12, bar: 34, baz: 56}
count += 1
end
end
end
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk ($(REVISION_H)): revert a part of r61055 because this obstructs
building ruby from tarball in clean (no ruby) environment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_thread.rb (test_signal_at_join): test with timeout
* thread.c (sleep_wait_for_interrupt): remove
(thread_join_sleep): use native_sleep directly to avoid extra
missing thread status change
[Bug #14181]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
timeval arithmetic may be reused in other places and this
makes sleep_timeval easier-to-read.
* thread.c (timeval_add): hoist out of sleep_timeval
(timeval_update_expire): ditto
(sleep_timeval): use new functions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.c (process_options): fallback to the encoding of the script
name since rb_realpath_internal() cannot convert the encoding
when it is ASCII-8BIT.
* test/ruby/test_rubyoptions.rb (test___dir__encoding): explicitly
pass environment variables for locale as they are overriden by
invoke_ruby.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Functions declared in include/ruby/backward.h is exported only when
the condition `!defined RUBY_EXPORT && !defined RUBY_NO_OLD_COMPATIBILITY`
is met (i.e. included by include/ruby/ruby.h).
So if it is not the case when ruby is built, this will not be exported.
This was not intentional at r60994.
[Bug #14192]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk (love): should install after test (but this change does not gurantee
the order).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
getrandom(2) and read(2) (from /dev/urandom) may return a random buffer
whose length is shorter than required. This change makes sure that they
get enough buffer by using a loop.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_vm_dump.rb (assert_darwin_vm_dump_works): gcc seems
not to chain some frames like Apple's clang.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e