summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-01-20extmk.rb: ignore generated sourcesnobu
* 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-20SecureRandom should try /dev/urandom first [Bug #9569]shyouhei
* 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-20Keep -jN optionnobu
* {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-20switch SipHash from SipHash24 to SipHash13 variantshyouhei
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-20compile.c: optimization of defined? in conditionnobu
* 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-20array.c: improve Array#samplenobu
* 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-20benchmarks for Bug#13136nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-20* 2017-01-20svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-20error.c: print default RSnobu
* 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-19parse.y: rescue/else/ensure in do-endnobu
* 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-19More description about the protected attribute of a methodnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-19string.c: rindex(//) should set $~.shugo
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-19parse.y: chomp by -lnobu
* 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-19Fix documentation of options for all of methods in FileUtils.hsbt
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-19ENV#fetch: fix documentation of raised exceptionnobu
[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-19Change Kernel#warn to call Warning.warnnobu
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-19id_table.c: fix typonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-19compile.c: check err_infonobu
* 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-19parse.y: warn spacenobu
* parse.y (parser_yylex): warn parentheses after space. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-18* 2017-01-19svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-18* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-18another benchmark for IO.copy_stream socket writingnormal
For testing Linux socket-only workaround for https://bugs.ruby-lang.org/issues/13085 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-18lib/profiler.rb: Specify frozen_string_literal: true.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-18vm_method.c: resolve refined method to undefnobu
* vm_method.c (rb_undef): resolve the method entry which refines a prepended method entry. [ruby-core:78944] [Bug #13096] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-18* 2017-01-18svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-18class.c: non-keyword hash classnobu
* class.c (rb_extract_keywords): keep the class of non-keyword elements hash as the original. [ruby-core:77813] [Bug #12884] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-17uri/generic.rb: fix exception on non-IP formatnobu
* lib/uri/generic.rb (URI::Generic#find_proxy): match IP address no_proxy against resolved self IP address. [Fix GH-1513] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-17lib/pstore.rb: Specify frozen_string_literal: true.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-17rinda/ring.rb (make_socket): do not keep socket on failuresnormal
This prevents leaked FD warnings on test/rinda/test_rinda.rb when testing on a machine without multicast support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-16basicsocket (rsock_bsock_send): do not truncate return valuenormal
send(2) and sendto(2) syscalls return `ssize_t', use the proper type and macro for converting to a Numeric VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-16* 2017-01-17svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-16doc: improve documentation for Binding [ci skip]normal
* remove explicit return from code examples * grammar fixes * other small fixes Patch by: Marcus Stollsteimer <sto.mar@web.de> [ruby-core:79082] [Bug #13132] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-16Fix a typo [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-16test_rational.rb: messagesnobu
* test/ruby/test_rational.rb (test_parse): add messages to assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-16* 2017-01-16svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-16file.c: refine messagenobu
* file.c (rb_get_path_check_convert): refine the error message when the path name contains null byte. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-15s/SaveStringValue/SafeStringValue/a_matsuda
Fix a typo in extension.rdoc. Signed-off-by: Akira Matsuda <ronnie@dio.jp> closes #1512 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-15.gdbinit: refine rp [ci skip]nobu
* .gdbinit (rp, output_string, rp): show the contents after NUL char. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-15rbinstall.rb: mimic rubygems wrapper scriptnobu
* tool/rbinstall.rb (app_script_text): move shell script part after comments generated by RubyGems. '#'-lines are comments in both of ruby and shell script. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-15lib/profile.rb: Specify frozen_string_literal: true.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-15rbinstall.rb: do nothing if bin script is samenobu
* tool/rbinstall.rb (check_executable_overwrite): do nothing if the existing file equals to the wrapper script to be generated. * tool/rbinstall.rb (generate_bin_script): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-14* 2017-01-15svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-14mention behavior of Array#join for nested arrays [ci skip]normal
The current documentation for Array#join does not mention the special treatment of nested arrays. It says: > Returns a string created by converting each element of the > array to a string, separated by the given separator. Expected behavior according to the docs would be: [ "a", [1, 2, [:x, :y]], "b" ].join("-") #=> "a-[1, 2, [:x, :y]]-b" # because of: [1, 2, [:x, :y]].to_s #=> "[1, 2, [:x, :y]]" Actual behavior: [ "a", [1, 2, [:x, :y]], "b" ].join("-") #=> "a-1-2-x-y-b" because join is applied recursively for nested arrays. The patch clarifies this behavior. (Also: small markup and grammar fix.) Patch by Marcus Stollsteimer <sto.mar@web.de> [ruby-talk:437238] [ruby-core:79079] [Bug #13130] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-14revert r57323nobu
StringIO.new makes the buffer IO.default_external, while StringIO.new("".dup) makes source encoding which is defaulted to UTF-8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-14fix up r57322nobu
* tool/rbinstall.rb: ruby_install_name is used too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-14resolv.rb: byte buffernobu
* lib/resolv.rb (Resolv::DNS::Message::MessageDecoder): treat the data as a byte buffer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-14Made #decode_rdata client to catch errorsnobu
* lib/resolv.rb (Resolv::DNS::Message::MessageDecoder#get_rr): re-raise an exception from decode_rdata as DecodeError, so it can report them to the top in more informative way. It was not reflecting on errors of data and thus breaking. Client code expects `DecodeError` and knows how to handle broken messages. [Fix GH-1511] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-14* 2017-01-14svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-14StringIO.new makes a RW buffernobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-13fix prolog in gem wrapper scriptsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e