io/wait is expected to work on any platform where sockets are
supported. io/wait methods uses fewer allocations and uses
ppoll internally under Linux for better performance on
high-numbered FDs.
[ruby-core:35572] describes the performance advantage of ppoll
on high-numbered FDs.
* lib/net/protocol.rb (rbuf_fill): use IO#wait_*able
* lib/net/http/generic_request.rb (wait_for_continue): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/ostruct.rb (method_missing): get rid of creating temporary
string object for method name, match Symbol itself.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to require JSON library for rubygems tests with Ruby 2.2.0 or earlier.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/mkmf.rb (xsystem): assume all warnings go to stderr but not
stdout. cl.exe always prints input file names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Exceptions are noisy in debug output and waste allocations.
Use "exception: false" introduced in 2.1 to return symbols for
common errors instead.
Follow-up commits will be prepared to reduce EOFError exceptions
to further quiet debug output and IO.select may be replaced by
io/wait methods if available to reduce allocations.
[ruby-core:68787] [Feature #11044]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/mkmf.rb (try_cppflags): set werror flag as same as cflags
and ldflags.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/mkmf.rb (try_compile): pass the given werror flag to try_do
to check if stderr is empty.
* lib/mkmf.rb (try_cflags, try_ldflags): default werror to true.
* win32/Makefile.sub (WERRORFLAG): remove useless option. VC does
not make warnings of unknown command option an error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rake is not available until installation now, so skip rake
packagetask even if it cannot load until it is actually needed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/fileutils.rb (FileUtils#mv): show the exact target path in
the error message instead of the destination parent directory
name. patched by João Britto <jabcalves AT gmail.com> at
[ruby-core:68706]. [Bug #11021]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/rubygems/test_case.rb (make_command): usually $MAKE is
defined but not $make.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/unicode_normalize/normalize.rb (UnicodeNormalize): REGEXP_K
matches only single chars which are keys of KOMPATIBLE_TABLE, so
string in nfkd_one is always single char and one of the key of
KOMPATIBLE_TABLE, that is that the default proc of NF_HASH_K only
copies a pair in KOMPATIBLE_TABLE. therefore NF_HASH_K is a
part of KOMPATIBLE_TABLE always, and just redundant.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/resolv.rb (Resolv::DNS::Resource#==, #hash): elements
returned by Kernel#instance_variables are Symbols now.
[ruby-core:68128] [Bug #10857]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* random.c (rand_random_number): add a method to return a random
number like SecureRandom to Random::Formatter.
* lib/securerandom.rb (random_bytes): move to Random::Formatter,
the base method of the module.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/securerandom.rb (Random::Formatter): extract random number
formatting methods into a module.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* random.c (random_raw_seed): extract platform dependent random
seed initialization function as a new method Random.raw_seed.
* lib/securerandom.rb (SecureRandom): use Random.raw_seed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/base64.rb (Base64.urlsafe_encode64): a new option "padding" to
suppress the padding character ("=").
* lib/base64.rb (Base64.urlsafe_decode64): now it accepts not only
correctly-padded input but also unpadded input.
[Feature #10740][ruby-core:67570]
* test/base64/test_base64.rb: Test for above
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e