aboutsummaryrefslogtreecommitdiffstats
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* Include stack elements left after errorsNobuyoshi Nakada2019-05-301-1/+1
|
* ripper: Ripper::Lexer#scanNobuyoshi Nakada2019-05-291-4/+29
| | | | | | * ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer#scan): parses the code and returns the result elements including errors. [EXPERIMENTAL]
* Fix typos in Ripper::Lexer#inspect and Ripper::Lexer#pretty_printNobuyoshi Nakada2019-05-281-2/+2
|
* Added #inspect and #pretty_inspect to Ripper::Lexer::ElemNobuyoshi Nakada2019-05-271-1/+16
|
* Suppress paranoid warnings for external/3rd-party librariesNobuyoshi Nakada2019-05-231-0/+1
| | | | [Feature #15665]
* Ripper: no documents of fallback methodsNobuyoshi Nakada2019-05-221-0/+2
|
* Fix the warning in 456586bb234915107da255d2944f620a7dd7048bNobuyoshi Nakada2019-05-151-1/+1
|
* io/console: rb_str_cat_conv_enc_opts is not exportedNobuyoshi Nakada2019-05-141-5/+3
|
* io/console: fix up timeout on WindowsNobuyoshi Nakada2019-05-141-2/+2
|
* io/console: support getch timeout on WindowsNobuyoshi Nakada2019-05-141-1/+9
|
* io/console: support wide character input on WindowsNobuyoshi Nakada2019-05-141-0/+39
|
* Add NaN / Infinity / MinusInfinity to mark listAaron Patterson2019-05-131-0/+5
| | | | This prevents the constants from moving.
* Update dependenciesNobuyoshi Nakada2019-05-131-0/+11
|
* Update the canonical repository for racc.Hiroshi SHIBATA2019-05-131-1/+1
|
* str_duplicate: Don't share with a frozen shared stringAlan Wu2019-05-091-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow up for 3f9562015e651735bfc2fdd14e8f6963b673e22a. Before this commit, it was possible to create a shared string which shares with another shared string by passing a frozen shared string to `str_duplicate`. Such string looks like: ``` -------- ----------------- | root | ------ owns -----> | root's buffer | -------- ----------------- ^ ^ ^ ----------- | | | shared1 | ------ references ----- | ----------- | ^ | ----------- | | shared2 | ------ references --------- ----------- ``` This is bad news because `rb_fstring(shared2)` can make `shared1` independent, which severs the reference from `shared1` to `root`: ```c /* from fstr_update_callback() */ str = str_new_frozen(rb_cString, shared2); /* can return shared1 */ if (STR_SHARED_P(str)) { /* shared1 is also a shared string */ str_make_independent(str); /* no frozen check */ } ``` If `shared1` was the only reference to `root`, then `root` can be reclaimed by the GC, leaving `shared2` in a corrupted state: ``` ----------- -------------------- | shared1 | -------- owns --------> | shared1's buffer | ----------- -------------------- ^ | ----------- ------------------------- | shared2 | ------ references ----> | root's buffer (freed) | ----------- ------------------------- ``` Here is a reproduction script for the situation this commit fixes. ```ruby a = ('a' * 24).strip.freeze.strip -a p a 4.times { GC.start } p a ``` - string.c (str_duplicate): always share with the root string when the original is a shared string. - test_rb_str_dup.rb: specifically test `rb_str_dup` to make sure it does not try to share with a shared string. [Bug #15792] Closes: https://github.com/ruby/ruby/pull/2159
* Update the canonical repository url.Hiroshi SHIBATA2019-05-071-1/+1
|
* syntax error can move, so do not cacheAaron Patterson2019-04-231-2/+2
|
* * expand tabs.git2019-04-231-1/+1
|
* T_MOVED can live on the stack, so make sure we can do book keepingAaron Patterson2019-04-221-0/+1
| | | | | Unused T_MOVED objects can live on the stack, so we need to make sure that they can be accounted for in book keeping
* Add `GC.compact` again.tenderlove2019-04-202-0/+4
| | | | | | 🙏 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Reverting compaction for nowtenderlove2019-04-172-4/+0
| | | | | | For some reason symbols (or classes) are being overridden in trunk git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2019-04-171-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Introduce pattern matching [EXPERIMENTAL]ktsj2019-04-172-1/+5
| | | | | | [ruby-core:87945] [Feature #14912] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Adding `GC.compact` and compacting GC support.tenderlove2019-04-172-0/+4
| | | | | | | | | | | This commit adds the new method `GC.compact` and compacting GC support. Please see this issue for caveats: https://bugs.ruby-lang.org/issues/15626 [Feature #15626] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/openssl/ossl_bn.c (ossl_bn_initialize): get rid of SEGVmame2019-04-101-2/+5
| | | | | | | | OpenSSL::BN.new(nil, 2) dumped core. [ruby-core:92231] [Bug #15760] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2019-04-101-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Reverting all commits from r67479 to r67496 because of CI failureskazu2019-04-103-9/+2
| | | | | | | | Because hard to specify commits related to r67479 only. So please commit again. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2019-04-101-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/openssl/ossl_bn.c (ossl_bn_initialize): get rid of SEGVmame2019-04-101-2/+5
| | | | | | | | OpenSSL::BN.new(nil, 2) dumped core. [ruby-core:92231] [Bug #15760] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add error globals to mark list so they don't movetenderlove2019-04-092-0/+4
| | | | | | | | JSON gem is referencing constants defined in Ruby then keeping a reference as a global. We need to register these globals so they stay pinned. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date: support for Reiwa, new Japanese eranobu2019-04-092-2/+7
| | | | | | [Feature #15742] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_core.c: [DOC] Heisei will be assumed if no-era [ci skip]nobu2019-04-091-0/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2019-04-031-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date: make zone a substring to copy encoding and taintednessnobu2019-04-032-28/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_parse.c: name JISX0301_DEFAULT_ERAnobu2019-04-021-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_parse.c: renamed JAPANESE prefix as JISX0301nobu2019-04-021-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2019-04-021-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date: use del_hash to extract an element destructivelynobu2019-04-023-11/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_parse.c: removed 'r' which is not in JIS X 0301 yetnobu2019-04-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2019-04-011-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_parse.c: extract Japanese era initialsnobu2019-04-011-3/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Numbered parameters [Feature #4475]nobu2019-03-171-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: fix infinite loopnobu2019-03-111-0/+7
| | | | | | | | * numeric.c (int_pow): fix infinite loop in the case of y equal 1 and power of x does not overflow. [ruby-core:91734] [Bug #15651] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add ignored_sp eventnobu2019-03-091-0/+6
| | | | | | | | * ext/ripper/lib/ripper/lexer.rb (Ripper::Lexer): add ignored_sp event which will be fired from Ripper::Lexer#on_heredoc_dedent method. [ruby-core:91727] [Bug #15648] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix PTY.open on OpenBSD [Bug #15607]naruse2019-03-061-1/+1
| | | | | | From: Jeremy Evans <code@jeremyevans.net> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fixed build failure of Travis CI. We need to support `make srcs`.hsbt2019-03-011-2/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support YACC environment variable for ripper.hsbt2019-03-012-3/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge json-2.2.0 from flori/json.hsbt2019-02-236-76/+105
| | | | | | https://github.com/flori/json/releases/tag/v2.2.0 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Try statx syscallnobu2019-02-202-2/+3
| | | | | | | * file.c (rb_file_s_birthtime): export for pathname to check if birthtime is supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Prefer relative directory from srcdir to top_srcdirnobu2019-02-147-7/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e