* id_table.c: swtich to "simple open addressing with quadratic probing"
by Yura Sokolov. For more detail measurements, see [Feature #12180]
* id_table.c: remove other algorithms to simplify the source code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c (setup_exception): make unfrozen copy of special
exception before setting up a cause.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test/ruby/test_marshal.rb test_context_switch (load) and test_gc (dump)
are failed on FreeBSD 10.3 and gcc7 (FreeBSD Ports Collection) 7.0.0
20170115 (experimental); RB_GC_GUARD looks not worked well.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c (special_object_p): uninterned Symbol also should not
raise a TypeError but return itself instead, as well as interned
Symbols. [ruby-core:79216] [Bug #13145]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/csv.rb (CSV#shift): the last column is an Array in extended
column since r55985. [ruby-dev:49964] [Bug #13149]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* template/configure-ext.mk.tmpl: embed MINIRUBY and SCRIPT_ARGS
to get rid of quoting problems of nmake.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk (EXT_MK): use double-quotes and remove SCRIPT_ARGS
which contains both types of quotes.
* template/configure-ext.mk.tmpl (all): use single-quotes for MAKE
which is set by nmake and contains spaces in the path. do not
use SCRIPT_ARGS.
* template/exts.mk.tmpl (all, static): separate dependency lines,
not to become a default target unintentionally.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/configure-ext.mk: configure each directories underneath ext
in parallel.
* template/exts.mk.tmpl: then collect the results.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
While I was developing my private topic branch I found that the VM
itself is not tested very much in `make test` tests. Of course
`make test-all` covers vast majority of the VM but running that task
is not an immediately possible thing when we are touching the VM. In
order to boost development in a rapid cycle I decided to add some
tests to the bootstraptest. Here it is.
* test_insns.rb: new test that covers insns.def.
* runner.rb (#assert_equal): pass extra options to the target
so that we can test frozen_string_literal: true situation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* template/extinit.c.tmpl: drop rest from the first dot in the
base name of a feature is ignored since r30464.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/extmk.rb: pass EXTINITS to sub make. if the template for
extinit.c is modified after extinit.c got compiled, extinit.c
will be re-generated together with ruby.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* random.c (InitVM_Random): rename Random.raw_seed to
Random.urandom. A quick search seems there are no practical use
of this method than securerandom.rb so I think it's OK to rename
but if there are users of it, this hunk is subject to revert.
* test/ruby/test_rand.rb (TestRand#test_urandom): test for it.
* lib/securerandom.rb (SecureRandom.gen_random): Prefer OS-
provided CSPRNG if available. Otherwise falls back to OpenSSL.
Current preference is:
1. CSPRNG routine that the OS has; one of
- getrandom(2),
- arc4random(3), or
- CryptGenRandom()
2. /dev/urandom device
3. OpenSSL's RAND_bytes(3)
If none of above random number generators are available, you
cannot use this module. An exception is raised that case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (compile_branch_condition): trivial optimization of
defined? expression in a branch condition, where a string is not
needed, but just a boolean.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c (rb_ary_sample): improve performance when many samples
from a large array. based on the patch by tomoya ishida
<tomoyapenguin AT gmail.com> in [ruby-dev:49956]. [Bug #13136]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c (rb_warn_m): print the default RS instead of an empty
string with a newline. [Feature #12944]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This seems a bug introduced by r520 (1.4.0). [ruby-core:79110] [Bug #13135]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (rb_parser_while_loop): should chomp but not chop by -l
option. [ruby-core:78099] [Bug #12926]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This allows Warning.warn to filter/process warning messages
generated by Kernel#warn. Currently, Warning.warn can only handle
messages generated by the rb_warn/rb_warning C functions.
The Kernel#warn API is different than the Warning.warn API, this
tries to get similar behavior, but there are probably corner cases
where the behavior is different.
This makes str_end_with_asciichar in io.c no longer static so it
can be called from error.c.
[Feature #12944]
Author: Jeremy Evans <code@jeremyevans.net>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (iseq_setup): bail out if any errors found.
[ruby-core:76531] [Bug #12613]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e