The IMAP server of DOCOMO returns such continuation requests.
[ruby-list:50558]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/csv.rb (CSV::Table#to_a, #to_csv): use Array#push instead of
Array#concat for performance improvement. This performance improvement is
proposed by zdennis <zach.dennis@gmail.com>. The patch is from
Mau Magnaguagno <maumagnaguagno@gmail.com>.
close#946
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
It ignored all of lines when given Regexp special characters.
[Feature #9147][ruby-core:58549]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/uri/ftp.rb: [DOC] fix format of example URLs. patched by
aycabta (Code Ahss) at [ruby-core:82379]. [Bug #13814]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/rubygems/resolver.rb (sort_dependencies): use stable sort.
TestGemRequestSetLockfile#test_to_s_gem_dependency_non_default
fails because this method return unstable results.
Note that Enumerable#sort_by is unstable.
I'm not sure the "stable" nature is required for RubyGems.
The fact is that using stable sort, the test passed on
mswin64+VS2017 where the sort results was reverse (unstable) order.
Also using `-i` instead of `i` (it means forcing unstable sort)
this test fails on other platform where the test successed before.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/csv.rb: fix incompatibility introduced in r59428.
CSV.new takes options as keyword arguments.
* test/csv/test_features.rb: add a test to ensure it raises error againt
unknown options
* test/csv/test_features.rb: add a test to ensure row_sep option is properly
applied
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/csv.rb: usb keyword parameters to receive options
* test/csv/test_features.rb: remove a test for checking options
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/optparse.rb (candidate): short options are case-sensitive by
the default, should not match case-different options..
https://github.com/mernen/completion-ruby/pull/9#issuecomment-317287946
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Because progname was memoized with ||= a logger call that involved
outputting false would be nil. Example code:
logger = Logger.new(STDOUT)
logger.info(false) # => nil
Perform an explicit nil check instead of ||= so that false will be output.
patched by Gavin Miller <gavingmiller@gmail.com> [Fix GH-1667]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Based on the patch by keysen (Jérémy Carlier).
[ruby-core:81641] [Bug #13649]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/optparse.rb: try Float() and Integer() instead of eval,
which does too much things.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Previously if the input started with a '0' then it will be converted
as octal even though it has been specified as a decimal. This commit
forces the number to be interpreted as a decimal.
[ruby-core:81927] [Bug #13722] [Fix GH-1665]
Author: william <william.mccumstie@outlook.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Also, error out if --ssl-private-key option is not given, since
specifying only the certificate makes no sense. [Feature #13714]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/un.rb: add https support. based on the patch by Flavio
Castelli <flavio@castelli.name> in [ruby-core:81901].
[Feature #13714]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/delegate.rb (eql?): Delegate to `eql?` of the inner object.
based on the patch by giginet <giginet.net@gmail.com>.
[ruby-core:76950] [Bug #12684]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/shell/system-command.rb (SystemCommand#initialize):
`def_e2message` wraps error message, but does not define new exception
* test/shell/test_command_processor.rb: add a test
This patch is authored by Kenichi Kamiya <kachick1@gmail.com>
close#1657
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Added following gemspecs.
* extensions: date, dbm, etc, fiddle, gdbm, sdbm, stringio, strscan, zlib
* pure ruby libraries: cmath, csv, fileutils, scanf, webrick
psych and rdoc is out of scope of this commit. I will merge after
upstream was change to `frozen_string_literal: true`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
There actually are some libraries that requires 'irb' such as byebug, and when
'irb' is required, it requires irb/src_encoding.rb, then it defines the toplevel
default_src_encoding method that is visible from anywhere in the end users' apps.
Here's a quick oneliner that shows what's happening.
% ruby -rpry-byebug -e 'p private_methods(false)'
[:include, :using, :define_method, :public, :private, :DelegateClass, :default_src_encoding]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to skip unnecessary string allocation on frozen_string_literal: false.
str_uplus can bypass calling rb_str_dup when OBJ_FROZEN is true.
* Before
erb_render 1.064
* Afete
erb_render 0.909
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
by reducing string allocation.
* Before
app_erb 0.687
* After
app_erb 0.679
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to skip object allocation for static string.
We can't always enable frozen_string_literal pragma because we can't
freeze string literals embedded by user for backward compatibility.
So we need to use fstring for each static string.
Since adding ".freeze" to string literals in #content_dump is slow
on compiling, I used unary "-" operator instead.
benchmark/bm_app_erb_render.rb: Added rendering-only benchmark to
test rendering performance on production environment.
This benchmark is created to reproduce the behavior on Sinatra (Tilt).
Thus it doesn't use ERB#result to skip parsing compiled code.
It doesn't use ERB#def_method too to regard `title` and `content` as
local variables. If we use #def_method, `title` and `content` needs
to be method call. I wanted to avoid it.
This patch's benchmark results is:
* Before
app_erb_render 1.250
app_erb 0.704
* After
app_erb_render 1.066
app_erb 0.686
This patch optimizes rendering performance (app_erb_render) without
spoiling (total of rendering +) compiling performance (app_erb).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The original intention of introducing `_erbout.force_encoding`
in r21170 was:
- "returns a string in the same character encoding as the input string."
- "When the input string has a magic comment, however, it returns a string
in the encoding specified by the magic comment."
And they are tested by test/erb/test_erb_m17n.rb well and this patch
passes the test.
Since magic comment is always added in ERB compiled code, using ''.dup
instead of String.new will set correct encoding without calling
force_encoding method.
The benchmark results are:
* Before
$ ./ruby benchmark/run.rb --matzruby=./ruby -m bm_app_erb
MatzRuby:
ruby 2.5.0dev (2017-05-26 skip-force-enc.. 58903) [x86_64-linux]
last_commit=Skip force_encoding in compiled code of erb
Ruby:
app_erb:
matz 0.715
* After
$ ./ruby benchmark/run.rb --matzruby=./ruby -m bm_app_erb
MatzRuby:
ruby 2.5.0dev (2017-05-26 skip-force-enc.. 58903) [x86_64-linux]
last_commit=Skip force_encoding in compiled code of erb
Ruby:
app_erb:
matz 0.672
And perf(1) results are:
* Before
$ sudo perf stat ./ruby benchmark/bm_app_erb.rb
Performance counter stats for './ruby benchmark/bm_app_erb.rb':
709.571746 task-clock (msec) # 1.000 CPUs utilized
5 context-switches # 0.007 K/sec
1 cpu-migrations # 0.001 K/sec
1,337 page-faults # 0.002 M/sec
3,088,936,521 cycles # 4.353 GHz
<not supported> stalled-cycles-frontend
<not supported> stalled-cycles-backend
4,849,564,282 instructions # 1.57 insns per cycle
1,027,042,087 branches # 1447.411 M/sec
19,983,456 branch-misses # 1.95% of all branches
0.709747823 seconds time elapsed
* After
$ sudo perf stat ./ruby benchmark/bm_app_erb.rb
Performance counter stats for './ruby benchmark/bm_app_erb.rb':
693.494673 task-clock (msec) # 1.000 CPUs utilized
7 context-switches # 0.010 K/sec
1 cpu-migrations # 0.001 K/sec
1,316 page-faults # 0.002 M/sec
3,025,639,349 cycles # 4.363 GHz
<not supported> stalled-cycles-frontend
<not supported> stalled-cycles-backend
4,694,848,271 instructions # 1.55 insns per cycle
994,496,704 branches # 1434.037 M/sec
19,693,239 branch-misses # 1.98% of all branches
0.693724345 seconds time elapsed
[fix GH-1147]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Users may modify the chunk yielded to them in Net::HTTPResponse#read_body.
This will allow users to reduce memory usage by calling
String#clear on the buffer once they're done using it.
* lib/net/protocol.rb (read): increment read_bytes earlier
(read_all): ditto
* test/net/http/test_httpresponse.rb (test_read_body_block_mod): new test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Otherwise literal data will be sent even if NO response is returned
because @exception is set to nil in receive_responses.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
if stags and etags are not changed from default.
:putobject insn (of regexp) will be used instead of :toregexp insn.
This means that the regexp won't be compiled for every
`SimpleScanner#scan` call.
It may not be a good idea to apply this kind of optimization for all cases.
But I applied this because it is default scanner and used frequently and has
relatively large impact for benchmark like this:
* Before
app_erb 1.023
* After
app_erb 0.781
This commit fixes only the bottleneck of performance regression introduced
in r53412. For maintainability, I won't fix other small regressions like
additional overhead of method calls.
[ruby-core:73820] [Bug #12074]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Using a parallel Net::HTTP downloader, this reduced memory usage
from around 120MB to 50MB on my 32-bit x86 system.
* lib/net/protocol.rb (rbuf_fill): clear temporary buffer
Test script I used:
require 'net/http'
require 'uri'
require 'digest/sha1'
url = 'http://80x24.org/git-i-forgot-to-pack/objects/pack/pack-97b25a76c03b489d4cbbd85b12d0e1ad28717e55.idx'
uri = URI(url)
use_ssl = "https" == uri.scheme
thrs = 30.times.map do
Thread.start do
cur = Thread.current.object_id
Net::HTTP.start(uri.host, uri.port, use_ssl: use_ssl) do |http|
req = Net::HTTP::Get.new(uri)
http.request(req) do |res|
dig = Digest::SHA1.new
res.read_body do |buf|
dig.update(buf)
#buf.clear # most Ruby programmers don't do this :<
end
warn "#{Time.now} #{cur} #{dig.hexdigest}\n"
end
end
:done
end
end
p thrs.map(&:value)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Use character class directly instead of
character class in character class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
when trim_mode is "-", for Windows environments.
[ruby-core:39625] [Bug #5339]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
when trim_mode is "<>", for Windows environments.
[Bug #11464]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
of LoadError in some method calls, not from `require "strscan"`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Original `SimpleScanner` was used only in tests.
Since `SimpleScanner` and `SimpleScanner2` work in the same way, I want
to drop the one which can't be used in a normal situation.
The only difference was `SimpleScanner` can be loaded without strscan
dependency but I think there's no situation that strscan is unavailable
because it's a standard library.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/prime.rb: Use accurate sqrt to insure all factors are tested.
Patch by Marcus Stollsteimer.
* test/test_prime.rb: Adapt test for timeout
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/tempfile.rb (Tempfile.create): should not fail even if the
temporary file has been removed in the block, just ignore.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to make it compatible with ERB::Util.url_encode.
ext/cgi/escape/escape.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Based on patch by madeofcode (Mark Dodwell).
[ruby-core:46168] [Bug #6696] [Fix GH-54]
`~` is a unreserved character.
https://tools.ietf.org/html/rfc3986#section-2.3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/rubygems/ext/ext_conf_builder.rb (build): needs to close
before unlink on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/rubygems/test_case.rb (teardown): call `Gem::refresh()` at the
end of `teardown`.
On parallel test sometimes fails test process. The reason
is:
(1) previous tests remains `Gem::Specification@@stubs` value
which points to temporary directories and the directories
are removed by `teardown` method of previous test.
(2) `require 'rubygems/gem_runner'` in `test_gem_gem_runner.rb`
tries to require test utility file. However, with strange `@@stubs`
RubyGems tries to load specification from removed directory.
`StubSpecification#to_spec` returns `nil` and error will occur.
The solution this patch employs is to refresh all of parameters
includes `Gem::Specification@@stubs` by `Gem::refresh()`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
get_response is called in a receiver thread, so there may be no pending
commands when get_response is called.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
In lib/unicode_normalize/normalize.rb, add explanations and clarifications
about the status of the files and the module. [ci skip]
This is in response to discussions at https://github.com/ruby/spec/pull/433
and https://bugs.ruby-lang.org/issues/5481#note-58.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/cgi/{core,util}.rb: include CGI::Util not only extending, to
share `@@accept_charset` class variable, so that it is always
accessible. [ruby-core:80986] [Bug #13539]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/unicode_normalize.rb: Remove definition of String#unicode_normalized?
(including documentation). Leave a comment explaining that the file is now empty.
* string.c: Define String#unicode_normalized? in rb_str_unicode_normalized_p in C,
(including documentation)
* lib/unicode_normalize/normalize.rb: Remove (re)definition of
String#unicode_normalized? to avoid warnings (when $VERBOSE==true) and
problems when String is frozen
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/unicode_normalize.rb: Remove definition of String#unicode_normalize!
(including documentation)
* string.c: Define String#unicode_normalize! in rb_str_unicode_normalize_bang in C,
(including documentation)
* lib/unicode_normalize/normalize.rb: Remove (re)definition of
String#unicode_normalize! to avoid warnings (when $VERBOSE==true) and
problems when String is frozen
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Parser has been accepted it but XML serializer wasn't accepted.
Reported by stefano frabetti. Thanks!!!
[ruby-core:80965] [Bug #13531]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/unicode_normalize.rb: Remove definition of String#unicode_normalize
(including documentation)
* string.c: Define String#unicode_normalize in rb_str_unicode_normalize in C,
(including documentation)
* lib/unicode_normalize/normalize.rb: Remove (re)definition of
String#unicode_normalize to avoid warnings (when $VERBOSE==true) and
problems when String is frozen
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Patch by Pavel Rosický. [Feature #13379] [ruby-core:80440]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Because the methods in lib/unicode_normalize.rb are overwritten
by those in lib/unicode_normalize/normalize.rb as soon as one
of them is called, the check for whether UnicodeNormalized is
defined or not is no longer necessary.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
simplify String#unicode_normalize! and #unicode_normalized?
in lib/unicode_normalize.rb by redefining them
in lib/unicode_normalize/normalize.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
simplify String#unicode_normalize in lib/unicode_normalize.rb
by redefining it in lib/unicode_normalize/normalize.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Details of changes:
0090800402/History.txt (L3)
* I kept ko1's commmit related thread issue. It's not merged 2.6 branch on rubygems.
1721dfa0ea
* I removed test_realworld_default_gem from rubygems-2.6.12. It fails on
Ruby trunk. Because it's differences of test suite and environment.
https://github.com/rubygems/rubygems/pull/1899
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Bump version to 1.4.0.beta1. Because https://rubygems.org/gems/webrick
is already reserved old version of webrick.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Import gemspec and test file from ruby/webrick.
* webrick.gemspec: Update files and dependency for standalone gem.
* test/webrick/utils.rb: Added explicitly loading of EnvUtil for
test suite without ruby core test suite.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Note that this feature is enabled only on environment variables are
multi-user safe. In this time the list includes Linux, FreeBSD, or
Darwin. [Bug #12921]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/rubygems/core_ext/kernel_require.rb: sometimes
`Kernel.send(:gem, spec.name)` can raise some errors
(Gem::MissingSpecError I observed) and this method
doesn't release RUBYGEMS_ACTIVATION_MONITOR correctly.
This patch fix this problem.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/irb/ruby-lex.rb (RubyLex#lex): fix conditions for continued
line; empty lines, a semicolon, first line in `begin` block,
just after `else` are not continued.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Bump version to 0.7.1. Beucause fileutils-0.7 is alread reserverd
on rubygems.org.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/ostruct.rb (OpenStruct#respond_to_missing?): this makes
OpenStruct#respond_to? works on any OpenStruct instance,
just like Kernel#respond_to? does, without workarounds.
[ruby-core:80292] [Bug #13358]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/ostruct.rb (OpenStruct.allocate): initialize an instance
variable directly, without calling `intialize` method which may
be overridden in a subclass. [ruby-core:80292] [Bug #13358]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Strings in "when" statements are allocation-free, so there's
never any reason to uglify the code to use opt_str_freeze over
the normal putobject instructions, here.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/uri/generic.rb: [DOC] expand docs for URI::Generic#normalize
to clarify what normalization means here.
Reported by Robert Gleeson. [ruby-core:58430] [Bug #9127]
* lib/uri/generic.rb: [DOC] fix indent for correct code block detection.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/tempfile.rb (Tempfile#size): Fix its behavior when nothing
is written. Tempfile#size should return 0 in this case.
The patch is from nobu <nobu@ruby-lang.org>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
With parallel test-all, the spec is sometimes nil.
To debug it raise more detailed error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update paragraph on implementation:
define_singleton_method is used, not define_method
* add call-seq with return values for each_pair
* adopt description of dig from Array and Hash
* fix description of the hash method
* :nodoc: initialize_copy, respond_to_missing?
* other small improvements, e.g. use the term `attribute' in the docs
(instead of `member'), which is clearer for users of the class
* improve code examples: e.g. use more consistent style (always use
double quotes, drop `p' and `puts', ...), update inspect output,
use example data that is not prone to change (like population)
* add more code examples
* fix some small errors and grammar
[ruby-core:79265] [Bug #13159]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/fileutils.rb: [DOC] add clarifying call-seq's for FileUtil.ln,
ln_s, and ln_sf, with better argument names for the created link and
link target. Reported by Mike Vastola. [ruby-core:62532] [Bug #9829]
* lib/fileutils.rb: [DOC] further improve descriptions of FileUtils.ln
and related methods; improve examples: relative links probably won't
work in other dir, avoid `include', use more generic homedir name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/unicode_normalize.rb: [DOC] prevent a comment from
showing up in the class documentation for String.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/optparse.rb: [DOC] nodoc OptParse, introduced with r46126,
to avoid leaking of its documentation (OptionParser's docs) into
the class documentation of Object. [ruby-core:79909] [Bug #13281]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/fileutils.rb: [DOC] fix invalid example code to make it
syntax highlighted, fix rdoc for lists, nodoc internal methods,
avoid a dangerous example.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/fileutils.rb (compare_file): [DOC] clarify documentation
by avoiding confusing return value of "maybe false".
[ruby-core:75431] [Misc #12365] reported by Robert A. Heiler.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/mkmf.rb (create_makefile): add TARGET_SO to CLEANLIBS only
when the extension library will be build, to get rid of trying
to remove $(TARGET_SO_DIR).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/mkmf.rb (try_link0): remove generated files other than the
executable file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Makefile.in (verify-static-library): separate from LIBRUBY_A.
no check every times by default.
* lib/mkmf.rb (try_link): remove debugging symbol directory after
linking, instead of try_do.
* lib/mkmf.rb (try_link): bccwin32 support has been removed long
ago.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
SecureRandom.gen_random_openssl still refers to Random.raw_seed, which
is renamed to Random.urandom by r57384. [Bug #9569]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/fileutils.rb (FileUtils#mkdir_p): no need to make root
directory which should be exist and cannot be made with mkdir
recent Cygwin can make a directory contains a colon.
[Bug #13214]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/rdoc/markup/to_html.rb (RDoc::Markup::ToHtml): the argument
text may contain warnings, which are useless to check if
parseable. merge rdoc/rdoc#440.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/csv.gemspec: initial gemspec for csv gem.
* tool/rbinstall.rb: support gemspec located under lib direcotry like `lib/foo.gemspec`
[Feature #13177]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57491 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
* 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
* 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
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
* 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
* 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
BufferedIO#rbuf_fill should preserve backtrace information when raising
EOFError. Otherwise, users get confused when EOFError is leaked out from
Net::SMTP etc. [ruby-core:78550] [Bug #13018]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/irb/slex.rb (postproc): translated a japanese comment in
ISO-2022-JP. [ruby-core:79017] [Misc #13117]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/forwardable.rb (_delegator_method): use defined? operator
instead of binding and calling unbound Kernel#respond_to?. a
remedy for an performance bottleneck.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/forwardable.rb (_delegator_method): use defined? operator
instead of binding and calling unbound Kernel#respond_to?. a
remedy for an performance bottleneck.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
`parser` refered RFC2396_Parser, but it is separated.
test is contributed by Dominik Menke
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
We were missing a `:nodoc:` magic comment that was making automated tools show
that this method was missing documentation, when it really didn't need to be
documented.
by Devon Estes <devon.c.estes@gmail.com>
https://github.com/ruby/ruby/pull/1482 fix GH-1482
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/irb/ruby-lex.rb (identify_identifier): treat identifier just
followed by a colon as a lable. this is not a precise solution
but enough for the time being. [ruby-core:78526] [Bug #13012]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
There is no need to call Utils.getservername when the :ServerName option is
specified, so delay Utils.getservername until needed to avoid unnecessary
DNS lookups. [ruby-core:78492] [Bug #13007]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/matrix.rb: now ruby warns ambiguous parentheses after a space in method definitions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e