Age | Commit message (Collapse) | Author |
|
* ext/win32ole/win32ole.c (Init_win32ole): should not use atexit to
free allocated hash table to avoid error on Cygwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* test/fiddle/test_pointer.rb (test_to_str, test_to_s, test_aref_aset):
Attempt to use independent strings for destructive tests that
directly modify values on memory by using Fiddle::Pointer.
[Bug #12537] [ruby-dev:49700]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
[Backport #12536]
* string.c: Fix memory corruptions when using UTF-16/32 strings.
[Bug #12536] [ruby-dev:49699]
* string.c (TERM_LEN_MAX): Macro for the longest TERM_FILL length,
the same as largest value of rb_enc_mbminlen(enc) among encodings.
* string.c (str_new, rb_str_buf_new, str_shared_replace): Allocate
+TERM_LEN_MAX bytes instead of +1. This change may increase memory
usage.
* string.c (rb_str_new_with_class): Use TERM_LEN of the "obj".
* string.c (rb_str_plus, rb_str_justify): Use str_new0 which is aware
of termlen.
* string.c (str_shared_replace): Copy +termlen bytes instead of +1.
* string.c (rb_str_times): termlen should not be included in capa.
* string.c (RESIZE_CAPA_TERM): When using RSTRING_EMBED_LEN_MAX,
termlen should be counted with it because embedded strings are
also processed by TERM_FILL.
* string.c (rb_str_capacity, str_shared_replace, str_buf_cat): ditto.
* string.c (rb_str_drop_bytes, rb_str_setbyte, str_byte_substr): ditto.
* string.c (rb_str_subseq, str_substr): When RSTRING_EMBED_LEN_MAX
is used, TERM_LEN(str) should be considered with it because
embedded strings are also processed by TERM_FILL.
Additional fix for [Bug #12536] [ruby-dev:49699].
Additional fix for [Bug #12536] [ruby-dev:49699].
* string.c (rb_usascii_str_new, rb_utf8_str_new): Specify termlen
which is apparently 1 for the encodings.
* string.c (str_new0_cstr): New static function to create a String
object from a C string with specifying termlen.
* string.c (rb_usascii_str_new_cstr, rb_utf8_str_new_cstr): Specify
termlen by using new str_new0_cstr().
* string.c (str_new_static): Specify termlen from the given encoding
when creating a new String object is needed.
* string.c (rb_tainted_str_new_with_enc): New function to create a
tainted String object with the given encoding. This means that
the termlen is correctly specified. Curretly static function.
The function name might be renamed to rb_tainted_enc_str_new
or rb_enc_tainted_str_new.
* string.c (rb_external_str_new_with_enc): Use encoding by using the
above rb_tainted_str_new_with_enc().
* string.c (str_fill_term): When termlen increases, re-allocation
of memory for termlen should always be needed.
In this fix, if possible, decrease capa instead of realloc.
[Bug #12536] [ruby-dev:49699]
* string.c: Partially reverts r55547 and r55555.
ChangeLog about the reverted changes are also deleted in this file.
[Bug #12536] [ruby-dev:49699] [ruby-dev:49702]
* string.c: Specify termlen as far as possible.
the termlen is correctly specified. Currently static function.
* string.c (rb_str_change_terminator_length): New function to change
termlen and resize heap for the terminator. This is split from
rb_str_fill_terminator (str_fill_term) because filling terminator
and changing terminator length are different things. [Bug #12536]
* internal.h: declaration for rb_str_change_terminator_length.
* string.c (str_fill_term): Simplify only to zero-fill the terminator.
For non-shared strings, it assumes that (capa + termlen) bytes of
heap is allocated. This partially reverts r55557.
* encoding.c (rb_enc_associate_index): rb_str_change_terminator_length
is used, and it should be called whenever the termlen is changed.
* string.c (str_capacity): New static function to return capacity
of a string with the given termlen, because the termlen may
sometimes be different from TERM_LEN(str) especially during
changing termlen or filling terminator with specific termlen.
* string.c (rb_str_capacity): Use str_capacity.
* string.c (str_buf_cat): Fix capa size for embed string.
Fix bug in r55547. [Bug #12536]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/openssl/ossl_ssl.c (ossl_ssl_write_internal):
avoid undefined behavior
* test/openssl/test_pair.rb (test_write_zero): new test
[ruby-core:76751] [Bug #12660]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@56300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* test/coverage/test_coverage.rb: ignored test when enabled to coverage.
It lead to crash with `make test-all`.
* compile.c (ADD_TRACE): ignore trace instruction on non-positive
line.
* parse.y (coverage): get rid of ArgumentError when the starting
line number is not positive. [ruby-core:76141] [Bug #12517]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/uri/mailto.rb (initialize): RFC3986_Parser#split sets opaque
only if the URI has path-rootless, not path-empty.
[ruby-core:76055] [Bug #12498]
patched by Chris Heisterkamp <cheister@squareup.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/date/date_strftime.c (date_strftime_with_tmx): reject too
large precision to get rid of buffer overflow.
reported by Guido Vranken <guido AT guidovranken.nl>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* regcomp.c (noname_disable_map): don't optimize out group 0
Ruby's Regexp doesn't allow normal numbered groups if the regexp
has named groups. On such case it optimizes out related NT_ENCLOSE.
But even on the case it can use \g<0>.
This fix not to remove NT_ENCLOSE whose regnum is 0.
[ruby-core:75828] [Bug #12454]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* missing/crypt.c: fix size macros to use configured values
for platforms long is larger than 32bit.
[ruby-core:75792] [Bug #12446]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/openssl/ossl_bn.c (try_convert_to_bnptr): Extracted from
GetBNPtr(). This doesn't raise exception but returns NULL on error.
(GetBNPtr): Raise TypeError if conversion fails.
(ossl_bn_eq): Implement BN#==.
(ossl_bn_eql): #eql? should not raise TypeError even if the argument
is not compatible with BN.
(ossl_bn_hash): Implement BN#hash.
* ext/openssl/ossl_bn.c (Init_ossl_bn): Define #== and #hash.
* test/openssl/test_bn.rb: Test BN#eql?, #== and #hash
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* transcode.c (str_transcode0): scrub in the given encoding when
the source encoding is given, not in the encoding of the
receiver. [ruby-core:75732] [Bug #12431]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/openssl/ossl_pkey_dh.c (ossl_dh_compute_key): Check that the DH
has 'p' (the prime) before calling DH_size(). We can create a DH with
no parameter but DH_size() does not check and dereferences NULL.
[ruby-core:75720] [Bug #12428]
* ext/openssl/ossl_pkey_dsa.c (ossl_dsa_sign): Ditto. DSA_size() does
not check dsa->q.
* ext/openssl/ossl_pkey_rsa.c (ossl_rsa_public_encrypt,
ossl_rsa_public_decrypt, ossl_rsa_private_encrypt,
ossl_rsa_private_decrypt): Ditto. RSA_size() does not check rsa->n.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* transcode.c (enc_arg, str_transcode_enc_args, econv_args):
remove volatile, and add GC guards in callers.
[ruby-core:75664] [Bug #12411]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* common.mk (build-ext), ext/extmk.rb: use variable EXTENCS
different than ENCOBJS, to get rid of circular dependency.
build libencs when linking encodings statically.
[ruby-core:75618] [Bug #12401]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* variable.c (rb_local_constants_i): exclude private constants
when excluding inherited constants too. [Bug #12345]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/drb/timeridconv.rb: don't use keeper thread. [Bug #12342]
* test/drb/ut_timerholder.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/json/lib/*.rb: Removed some comments. Because these are unnecessary
class description. [ci skip][Bug #12255][ruby-core:74835]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* pack.c (pack_pack): use union instead of bare variable to ease
optimizations and avoid assigning x87 floating point number.
[ruby-core:74496] [Bug #12209]
* pack.c (pack_unpack): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/socket/option.c, ext/socket/rubysocket.h (inet_ntop): share
the fallback definition. [ruby-core:76646] [Bug #12645]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm.c (vm_set_main_stack): remove unnecessary check. toplevel
binding must be initialized. [Bug #12611] (N1)
* win32/win32.c (w32_symlink): fix return type. [Bug #12611] (N3)
* string.c (rb_str_split_m): simplify the condition.
[Bug #12611](N4)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* thread.c (rb_wait_for_single_fd): Clean up fds.revents every time
before calling ppoll(2). [Bug #12575] [ruby-dev:49725]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/webrick/httpservlet/cgihandler.rb (do_GET): delete HTTP_PROXY
* test/webrick/test_cgi.rb (test_cgi_env): new test
* test/webrick/webrick.cgi (do_GET): new endpoint to dump env
[ruby-core:76511] [Bug #12610]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/rexml/attribute.rb (REXML::Attribute#to_string): Fix wrong
entry reference name of double quote.
[Bug#12609][ruby-core:76509]
Patch by Joseph Marrero. Thanks!!!
[Bug #12609][ruby-core:76509]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* gc.c (gc_mark_roots): should mark the VM object itself to mark
singleton class of the VM object.
Before this patch, we only set mark bit for the VM object and
invoke mark function separately.
[Bug #12583]
* test/ruby/test_gc.rb: add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
gems on NFS. [Backport #12579]
* lib/rubygems.rb: bump version.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* vm_args.c (setup_parameters_complex): don't raise ArgumentError
if an array is given for instance_exec with optional argument.
[ruby-core:76300] [Bug #12568]
https://github.com/rails/rails/pull/25699
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/net/http/generic_rquest.rb (write_header): A Request-Line must
not contain CR or LF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/net/ftp.rb (putline): raise an ArgumentError when
CR or LF is included in a line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* string.c (tr_trans): consider terminator length and fix heap
overflow. reported by Guido Vranken <guido AT guidovranken.nl>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
fake.rb: rubyarchhdrdir for rubyspec
* common.mk (test-rubyspec): use fake script to set header
directories.
* template/fake.rb.in (RUBYOPT): set -r option to propagate to
forked processes.
* tool/fake.rb (prehook): set rubyarchhdrdir too.
* too/fake.rb: don't fake libdir. use libdirname instead.
* tool/fake.rb: don't fake libdir. use libdirname instead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
because the implementation of Object#hash is a little difference from
trunk. cf. [Backport #12391]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* bignum.c (rb_big_hash): make it public function to be available in
other source files, and remove documentation comment for Bignum#hash.
* bignum.c (Bignum#hash): remove its definition because it is unified
with Object#hash.
* include/ruby/intern.h (rb_big_hash): add a prototype declaration.
* hash.c (any_hash): treat Bignum values directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* lib/optparse.rb (OptionParser::Completion.candidate): get rid of
nil as key names. [ruby-core:75773] [Bug #12438]
* lib/optparse.rb (OptionParser#make_switch): char class option
cannot be NoArgument, default to RequiredArgument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* regparse.c (fetch_token_in_cc): raise error if given octal escaped
character is too big. [Bug #12420] [Bug #12423]
* re.c (unescape_nonascii): scan hex up to only 3 characters.
[Bug #12420] [Bug #12423]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* process.c (rb_exec_getargs): honor the expected argument types
over the conversion method. the basic language functionality
should be robust. [ruby-core:75388] [Bug #12355]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* parse.y (new_if_gen): set newline flag to NODE_IF to trace all
if/elsif statements. [ruby-core:67720] [Bug #10763]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/date/date_core.c (Init_date_core): [DOC] Convert DateTime
documentation to RDoc from Markdown.
[ruby-core:75136] [Bug #12311]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
gems. [ruby-core:74814] [Backport #12248]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* variable.c (rb_local_constants_i): exclude hidden constants.
[ruby-core:75575] [Bug #12389]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* regcomp.c (compile_length_tree): return error code immediately
if compile_length_tree raised error [Bug #12418]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec): consider
non-finite float values not to raise FloatDomainError.
[ruby-core:75682] [Bug #12414]
* ext/bigdecimal/bigdecimal.c (isfinite): isfinite does not always
exist. fixed build error on Windows itroduced at r55123.
exist. fixed build error on Windows introduced at r55123.
* ext/bigdecimal/bigdecimal.c (isfinite): get rid of a warning on
cygwin. [Bug #12417][ruby-core:75691]
* include/ruby/missing.h (isfinite): move from numeric.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* thread.c (recursive_list_access): a object id may be a Bignum. so,
the list must be a objhash, instead of a identhash.
this fixes many test errors on mswin64 CI.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* string.c (rb_str_modify_expand): check integer overflow.
[ruby-core:75592] [Bug #12390]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* insns.def (defineclass): Also raise an error when redeclaring the
superclass of a class as Object and it has another superclass.
[Bug #12367] [ruby-core:75446]
* test/ruby/test_class.rb: test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* bignum.c: [DOC] Update result of 123456789 ** -2.
[ruby-dev:49606] [Bug #12339]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* complex.c (rb_complex_set_imag): Fix to properly set imag
of complex.
* internal.h (RCOMPLEX_SET_IMAG): undef RCOMPLEX_SET_IMAG
instead of duplicated undef RCOMPLEX_SET_REAL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* win32/win32.c, include/ruby/win32.h (rb_w32_utruncate): implements new
truncate alternative which accepts UTF-8 path.
* file.c (truncate): use above function.
[Bug #12340]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* test/ruby/test_time_tz.rb: Tests depends on Europe/Moscow removed
to avoid test failures due to the tzdata change.
https://github.com/eggert/tz/commit/8ee11a301cf173afb0c76e0315b9f9ec8ebb9d95
Found by naruse.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@54815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
this fixes randomly test failure introduced by r54698.
cf. [Bug #12082]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@54799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|