Граф коммитов

45492 Коммитов

Автор SHA1 Сообщение Дата
svn 26270bd243 * 2017-01-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-25 03:03:53 +00:00
ko1 4c2d014e92 swithc id_table data structure.
* 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
2017-01-25 03:03:52 +00:00
nobu 54fa9f9e13 eval.c: copy special exception
* 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
2017-01-24 14:52:07 +00:00
nobu 7bf450d0c3 parse.y (parser_yylex): remove wrong warning
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-24 07:52:41 +00:00
svn e22aa95141 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-24 02:38:58 +00:00
hsbt 5d43821536 Update Rubygems 2.6.10
* 2ee5bf9fd3
 * be510dd409

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-24 02:38:57 +00:00
naruse 6219b68fb5 Fix typo of URI#escape [Bug #13147]
patched by Steve Hill <sghill.dev@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-23 17:02:08 +00:00
naruse 7c1b30a602 Prevent GC by volatile [Bug #13150]
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
2017-01-23 16:58:27 +00:00
svn be220c4f35 * 2017-01-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-23 15:47:33 +00:00
kazu 0c9e2cf264 test/test_tmpdir.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-23 15:47:32 +00:00
nobu 11e6bd5ac2 object.c: no TypeError at Symbol
* 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
2017-01-23 06:16:04 +00:00
nobu 5bb125c63e csv.rb: fix field_size_limit check
* 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
2017-01-23 05:59:28 +00:00
nobu 9600fb38a9 error.c: fixed doc [ci skip]
* error.c (exc_message): fixed doc regarding the presence of
  to_str.  [Fix GH-1517]

Author:    Marc Gauthier <marcg.gauthier@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-23 04:49:19 +00:00
nobu 48d489030a configure-ext.mk.tmpl: embed macros
* 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
2017-01-23 04:22:23 +00:00
nobu f41b7517dc Fix for nmake
* 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
2017-01-23 03:51:25 +00:00
nobu abb8fc1b17 configure-ext.mk.tmpl: FORCE
* template/configure-ext.mk.tmpl (FORCE): add missing target for
  BSD make.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-23 03:43:43 +00:00
nobu 17b748df2b Parallel ext configuration
* 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
2017-01-23 02:50:23 +00:00
svn ee9f6fdfad * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-23 02:47:17 +00:00
shyouhei 80040c166e improve C0 coverage of insns.def from 65.9% to 96.1%
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
2017-01-23 02:47:16 +00:00
nobu ea87854c52 extinit.c.tmpl: drop after dot
* 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
2017-01-23 02:19:00 +00:00
svn 7c30524bce * 2017-01-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-23 02:18:59 +00:00
nobu eb411fad21 extmk.rb: EXTINITS to sub make
* 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
2017-01-23 02:18:59 +00:00
nobu 78b95b49f8 template/extinit.c.tmpl
* template/extinit.c.tmpl: separate from ext/extmk.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-22 12:50:36 +00:00
nobu 709a60f92d Makefile.sub: refine distclean-ext
* win32/Makefile.sub (distclean-ext, realclean-ext): remove
  extinit.c and suppress error message when failed to remove ext
  directory.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-22 08:04:37 +00:00
shyouhei 75dbfa1360 NEWS for SecureRandom's random source [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-22 04:14:21 +00:00
shyouhei e80ae20cf0 NEWS for SipHash13 [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-22 04:02:42 +00:00
svn 8115e24a03 * 2017-01-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-22 03:06:18 +00:00
kazu 9985b75940 Hash#fetch: fix grammar in documentation.
[Fix GH-1515][ci skip]
Author:    Alyssa Ross <hi+services.github@alyssa.is>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-22 03:06:17 +00:00
kazu 562bbdf995 lib/tempfile.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-21 12:21:05 +00:00
svn e81ed936b8 * 2017-01-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-21 06:17:08 +00:00
nobu ca3fe508c9 Makefile.in: clean ruby-runner [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-21 06:17:07 +00:00
kazu 121984da8e Remove deprecated rbconfig/datadir
This is deleted at
0e3c2c1f04
in upstream.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-20 13:33:06 +00:00
nobu ef31fedd09 extmk.rb: ignore generated sources
* ext/extmk.rb (extract_makefile): ignore generated source files
  not to reconfigure when in-place build.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-20 10:59:47 +00:00
shyouhei abae70d6ed SecureRandom should try /dev/urandom first [Bug #9569]
* 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
2017-01-20 08:00:00 +00:00
nobu e95eb9584a Keep -jN option
* {cygwin,template}/GNUmakefile.in (MFLAGS, MAKEFLAGS): keep -jN
  option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-20 07:45:10 +00:00
shyouhei 04c94f95d1 switch SipHash from SipHash24 to SipHash13 variant
SipHash13 is secure enough to be used in hash-tables,
and SipHash's author confirms that.
Rust already considered switch to SipHash13:
  https://github.com/rust-lang/rust/issues/29754#issue-116174313
Jean-Philippe Aumasson confirmation:
  https://github.com/rust-lang/rust/issues/29754#issuecomment-156073946
Merged pull request:
  https://github.com/rust-lang/rust/pull/33940

From: Sokolov Yura aka funny_falcon <funny.falcon@gmail.com>
Date: Thu, 8 Dec 2016 20:31:29 +0300
Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org>
Fixes: [Feature #13017]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-20 06:01:23 +00:00
nobu f81c1c24b8 compile.c: optimization of defined? in condition
* 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
2017-01-20 04:27:55 +00:00
nobu 2de1dbdffc array.c: improve Array#sample
* 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
2017-01-20 02:39:27 +00:00
nobu 8f76ad3795 benchmarks for Bug#13136
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-20 02:27:28 +00:00
svn dfac1f5a61 * 2017-01-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-20 01:02:38 +00:00
nobu 1d4976c0cf error.c: print default RS
* 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
2017-01-20 01:02:37 +00:00
nobu 0ec889d7ed parse.y: rescue/else/ensure in do-end
* parse.y (do_body): allow rescue/else/ensure inside do/end
  blocks.  [Feature #12906]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-19 09:54:58 +00:00
naruse f34d0ba3eb More description about the protected attribute of a method
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-19 09:34:30 +00:00
shugo d33726b837 string.c: rindex(//) should set $~.
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
2017-01-19 08:13:03 +00:00
nobu af9a151f0b parse.y: chomp by -l
* 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
2017-01-19 07:18:23 +00:00
hsbt 18a315df43 Fix documentation of options for all of methods in FileUtils.
Patch by galia traub( @galiat ). [Fix GH-1510][ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-19 07:07:17 +00:00
nobu c59e739b02 ENV#fetch: fix documentation of raised exception
[Fix GH-1514]
Author:    Misty De Meo <mistydemeo@github.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-19 06:39:44 +00:00
nobu 50db992a6a Change Kernel#warn to call Warning.warn
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
2017-01-19 06:25:06 +00:00
nobu 00ed779cb0 id_table.c: fix typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-19 05:24:34 +00:00
nobu d6fc7d43d7 compile.c: check err_info
* 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
2017-01-19 03:42:07 +00:00