Age | Commit message (Collapse) | Author |
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v2_3_4@58214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
The patch was provided by usa. [ruby-core:80484] [Bug #13376]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* hash.c (any_hash): fix Symbol#hash to be nondeterministic.
The patch was provided by Eric Wong. [ruby-core:80433] [Bug #13376]
test/ruby/test_symbol.rb: new test for nondeterminism
We need to ensure hashes for static symbols remain
non-deterministic to avoid DoS attacks. This is currently the
case since 2.4+, but was not for the 2.3 series.
* test/ruby/test_symbol.rb (test_hash_nondeterministic): new test
[ruby-core:80430] [Bug #13376]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v2_3_4@58196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
test_io_console.rb: fix of old CentOS5
* test/io/console/test_io_console.rb (test_winsize): on old CentOS5
window size seems unable to be set across a pty.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
this patch is from https://github.com/k-takata/Onigmo/commit/e5c0e6c36187898bb27960cd66d591f172558848. [Backport #12997]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
configure.in: syscall is deprecated on macOS
* configure.in: syscall is no longer supported on macOS since
10.12. [ruby-core:80300] [Bug #13361]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
proc.c: documentation for Proc#{call,yield,[]}
* proc.c: [DOC] fix and improve docs for Proc#{call,yield,[]}:
* change order of Document-method directives as workaround for an
RDoc rendering problem where the documentation for Proc#call displays
a "Document-method: []" code block. [ruby-core:79887] [Bug #13273]
* add missing call-seq and example for Proc#yield
* remove pointless cross reference to Proc#yield
* update description for handling of extra or missing arguments,
improve examples and add cross reference to #lambda?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
doc: improve documentation for Binding [ci skip]
* 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/branches/ruby_2_3@58184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
fix UTF-32 valid_encoding?
* enc/utf_32be.c (utf32be_mbc_enc_len): check arguments precisely.
[ruby-core:79966] [Bug #13292]
* enc/utf_32le.c (utf32le_mbc_enc_len): ditto.
* regenc.h (UNICODE_VALID_CODEPOINT_P): predicate for valid
Unicode codepoints.
fix UTF-32 valid_encoding?
* test/ruby/test_io_m17n.rb (TestIO_M17N#test_puts_widechar): do
not use invalid codepoint. [ruby-core:79966] [Bug #13292]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
broken mingw
* configure.in: check whether frexp and modf are broken.
* include/ruby/win32.h (frexp, modf): ignore bad declarations when
compiling as C++. [ruby-core:79859] [Bug #13267]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
disable critical-error-handler
* win32/win32.c (rb_w32_sysinit): disable critical-error-handler
message box even on mswin, regardless of runtime DLL version.
[ruby-dev:49988] [Bug #13254]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
fileutils.rb: do not make root
* 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/branches/ruby_2_3@58180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
parallel.rb: fix intervention
* test/lib/test/unit/parallel.rb (_report): send a response and a
newline atomically, to get rid of intervention with "p" which
runs in a separate thread.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
lib/ostruct.rb: Fix returned value of each_pair.
From a patch by Marcus Stollsteimer. [Fixes #13169]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
io.c: close before wait
* io.c (io_close_fptr): notify then close, and wait for other
threads before free fptr. [ruby-core:79262] [Bug #13158]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
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/branches/ruby_2_3@58176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
string.c: block for scrub with ASCII-incompatible
* string.c (rb_enc_str_scrub): honor the given block with
ASCII-incompatible encoding. [ruby-core:79039] [Bug #13120]
string.c: yield invalid part
* string.c (rb_enc_str_scrub): yield the invalid part only with
ASCII-incompatible. [ruby-core:79039] [Bug #13120]
string.c: replacement and block
* string.c (rb_enc_str_scrub): only one of replacement and block
is allowed. [ruby-core:79038] [Bug #13119]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
vm_method.c: resolve refined method to undef
* 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/branches/ruby_2_3@58174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
rational.c: memory leak in gcd
* rational.c (rb_gcd_gmp): fix memory leak. patched by KISHIMOTO,
Makoto <ksmakoto AT dd.iij4u.or.jp> in [ruby-dev:49934].
[Bug #13089]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
win32/resolv.rb: ad hoc workaround
* ext/win32/lib/win32/resolv.rb (Win32::Resolv::SZ): an ad hoc
workaround for broken registry. SearchList and other registry
values must be REG_SZ, or Windows ignores anything in those
values otherwise. [ruby-dev:49924] [Bug #13081]
https://github.com/rubygems/rubygems/issues/1700
win32/registry.rb: registry type names
* ext/win32/lib/win32/registry.rb (Win32::Registry#read): show
registry type names instead of numeric values.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
pack.c: avoid returning uninitialized String
Fix unpacking with 'b', 'B', 'h' and 'H' format. Do not return an
uninitialized String to Ruby before filling the content bytes.
Fixes r11175 ("pack.c (pack_unpack): execute block if given with
unpacked value instead of creating an array", 2006-10-15).
[ruby-core:78841] [Bug #13075]
test/ruby/test_pack.rb: fix test case added by r57187
The test case for String#unpack added by r57187 is not properly testing
because the String will be filled after the block invocation.
[ruby-core:78841] [Bug #13075]
Thanks to nagachika for pointing this out:
http://d.hatena.ne.jp/nagachika/20161226/ruby_trunk_changes_57184_57194#r57187
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
ruby-lex.rb: fix for label
* 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/branches/ruby_2_3@58170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
io.c: improve docs
* io.c: [DOC] improve and harmonize docs for IO#read and ARGF#read;
fix invalid example code for IO#read to make it syntax highlighted.
* io.c: [DOC] various improvements for docs of IO, ARGF, and Kernel:
fix indent to ensure correct code block detection; sync "outbuf"
paragraph for {IO,ARGF}#read, {IO,ARGF}#readpartial, and IO#sysread;
fix formatting of call-seq's; improve Kernel#open example to use nil?;
fix RDoc markup and typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
docs for IO#print
* io.c: [DOC] split documentation for IO#print into smaller paragraphs,
delete duplicate sentence, fix call-seq.
Based on a patch by Dario Daic. [ruby-core:78291] [Bug #12975]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
class.c: non-keyword hash class
* 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/branches/ruby_2_3@58167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
fix optimization for hash aset/aref with fstring
Patch by Eric Wong [ruby-core:78797].
I don't like the idea of making insns.def any bigger to support
a corner case, and "test_hash_aref_fstring_identity" shows
how contrived this is.
[ruby-core:78783] [Bug #12855]
adjust indent [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
stringio.c: RB_INTEGER_TYPE_P
* ext/stringio/stringio.c (RB_INTEGER_TYPE_P): fallback definition
for 2.3 or earlier.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
test_queue.rb: fix portability
* test/thread/test_queue.rb (test_queue_with_trap): fix
portability. use SIGINT instead of SIGUSR2 which is supported
on not all platforms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
docs for creating arrays
* array.c: [DOC] add example for Array.new with block and index.
Reported by Don Cruickshank. [ruby-core:68442] [Bug #10944]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* win32/win32.c (poll_child_status): rb_w32_wait_events_blocking() sets
errno internally, then should not set it here.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
ostruct.rb: fix OpenStruct.allocate
* 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/branches/ruby_2_3@58161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
stringio.c: check character code
* ext/stringio/stringio.c (strio_ungetc): check if the character
code is valid in the encoding. reported by Ahmad Sherif
(ahmadsherif) at https://hackerone.com/reports/209593.
stringio.c: check range
* ext/stringio/stringio.c (strio_ungetc): raise RangeError instead
of TypeError at too big value, as well as IO#ungetc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
rbinstall.rb: Gem::Installer lacks dir_mode option
* tool/rbinstall.rb (bundle-gems): Gem::Installer does not support
directory permission option, set umask to owner writable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
[Backport #13238]
class.c: no fstring singleton class
* class.c (singleton_class_of): prohibit fstrings from creating
singleton classes.
temporary measure for [ruby-dev:49867] [Bug #12923]
test_fstring.rb: fix exception
* test/-ext-/string/test_fstring.rb (test_singleton_class): fix
expected exception class. [ruby-dev:49867] [Bug #12923]
vm_eval.c: fstring instance_eval
* vm_eval.c (singleton_class_for_eval): enable fstring singleton
class for instance_eval. [ruby-core:78116] [Bug #12930]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
[DOC] Update an obsolete example for slice_before.
The argument for Enumerable#slice_before is is removed at Ruby 2.3.
Reported by Shyouhei Urabe. [Bug #13202]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
Fix bug of Tempfile#size if nothing is written [Bug #13198]
* 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/branches/ruby_2_3@58154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
hash.c: exception examples
* hash.c (rb_hash_dig): [DOC] add examples of exceptions.
Fix doc for Hash#dig and Struct#dig
* hash.c (rb_hash_dig): [DOC] correct argument name
in method description; fix formatting in examples.
* struct.c (rb_struct_dig): ditto.
[ruby-core:79221] [Bug #13148]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
rbinstall.rb: default umask
* tool/rbinstall.rb: revert r49841 and default umask to just
prohibit all from writing. symlink(2) has no argument to set
permissions but is affected by umask.
[ruby-dev:49975] [Bug #13194]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
console.c: OOB access
* ext/io/console/console.c (console_set_winsize): fix
out-of-bounds access. [ruby-core:79004] [Bug #13112]
console.c: unpaired size
* ext/io/console/console.c (console_set_winsize): reject unpaired
pixel size.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
array.c: do not resize to less than 0
Shrinking the Array from the block invoked by Array#select! or
Array#reject! causes the Array to be a negative number size. Ensure that
the resulting Array won't be smaller than 0.
[ruby-core:78739] [Bug #13053]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* eval.c, method.h, proc.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c:
TracePoint#method_id should return method_id, not callee_id.
[ruby-core:77241] [Feature #12747]
* test/ruby/test_settracefunc.rb: change accordingly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/uri/mailto.rb: Removed needless `return` and use `.`` instead of `::`
with class method.
* test/uri/test_mailto.rb: Added tests for coverage.
Use URI.decode_www_form_component [Bug #10774]
`parser` refered RFC2396_Parser, but it is separated.
test is contributed by Dominik Menke
test_mailto.rb: adjust scope
test_mailto.rb: overwritten methods
* test/uri/test_mailto.rb (URI::TestMailTo#test_to_mailtext):
merge overwritten methods. [Bug #10774]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
parse.y: heredoc token
* parse.y (parser_heredoc_identifier): gather branches by quote
char.
parse.y: indent at invalid identifier
* parse.y (parser_heredoc_identifier): set indent only when valid
identifier, not to dedent non-existent contents later.
[ruby-core:79772] [Bug #13253]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
rational.c: infinity in power
* rational.c (nurat_expt): return Infinity due to overflow.
[ruby-core:79686] [Bug #13242]:
rational.c: infinity in power
* rational.c (nurat_expt): return 0 due to overflow.
[ruby-core:79686] [Bug #13242]:
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
io.c: fix race between read and close
* io.c (io_fillbuf): fix race between read and close, in the case
the IO gets closed before the reading thread achieve the lock.
[ruby-core:78845] [Bug #13076]
thread.c: fix race between read and close
* thread.c (rb_thread_fd_close): wait until all threads using the
fd finish the operation, not to free the buffer in use.
[ruby-core:78845] [Bug #13076]
revert a part of r57199
* io.c (io_fillbuf): revert a part of r57199 because it broke IO#getch.
see also [Bug #13076]
io.c: fix race between read and close
* io.c (io_fillbuf): fix race between read and close and bail out
in the case the IO gets closed before the reading thread achieve
the lock. [ruby-core:78845] [Bug #13076]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
vm.c: check type of hash to merge
* vm.c (core_hash_merge): check the type of the target hash to
merge. [ruby-core:78536] [Bug #13015]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
use TRUE/FALSE.
define rb_thread_sleep_deadly_allow_spurious_wakeup().
* thread.c, thread_sync.c: define new function
rb_thread_sleep_deadly_allow_spurious_wakeup() and use it instead of
using sleep_forever() directly.
allow Queue operation in trap.
* thread_sync.c: allow spurious wakeup to check Queue status just after trap.
[Bug #12405]
* test/thread/test_queue.rb: add a test for it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|