aboutsummaryrefslogtreecommitdiffstats
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* Do not allocate a string to check if a scalar is an integerJean Boussier2019-06-251-9/+7
|
* Remove string_cache in ScalarScannerJean Boussier2019-06-251-10/+1
|
* Reduce string allocations in scalar_scannerJean Boussier2019-06-251-17/+15
|
* Removed CHANGELOG from rdoc files.SHIBATA Hiroshi2019-06-251-1/+1
|
* Retired to write CHANGELOG.rdoc. Because It has no update from 2015.SHIBATA Hiroshi2019-06-251-1/+1
|
* Dump Hash ivars before elementsAaron Patterson2019-06-251-9/+9
| | | | | When the Hash is revived, the ivars will be set before elements. This is for the case when the hash setter depends on ivars set on the hash.
* Round trip exception backtracesAaron Patterson2019-06-252-0/+5
| | | | This commit allows exception backtraces to round trip
* Refactor exception dumpingAaron Patterson2019-06-251-28/+17
|
* Dumping the backtrace never worked, so remove itAaron Patterson2019-06-251-14/+10
| | | | Dumping the backtrace for exceptions never worked, so lets remove it.
* Remove IA64 support.Samuel Williams2019-06-191-6/+0
|
* Partly revert directory structure for cparse.Hiroshi SHIBATA2019-06-193-0/+0
| | | | It break the some build environment.
* Restore ruby/ruby change for extconf.rb.Hiroshi SHIBATA2019-06-191-1/+2
|
* Backport racc-1.4.15 from upstream.Hiroshi SHIBATA2019-06-194-8/+13
|
* Support Bison 3 in ripperNobuyoshi Nakada2019-06-171-0/+1
|
* Prefer `enum yytokentype` to intNobuyoshi Nakada2019-06-151-2/+2
|
* Add pipeline operator [Feature #15799]Nobuyoshi Nakada2019-06-131-0/+1
|
* Ripper::Lexer: fallback parse error token to the previous oneNobuyoshi Nakada2019-06-121-1/+11
|
* * expand tabs.git2019-06-111-3/+3
|
* ext/socket/ipsocket.c: Use SO_REUSEADDR for local_host/portYusuke Endoh2019-06-111-0/+5
| | | | | | | Sometimes ruby/spec fails when trying to specify local_host and local_port for TCPSocket.open. https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-master/log/20190610T192504Z.fail.html.gz
* win32/registry.rb: fix potential infinite loopNobuyoshi Nakada2019-06-071-2/+2
| | | | | * ext/win32/lib/win32/registry.rb (Win32::Registry#each_value): advance the index even if an error occurred in #read.
* Optimize CGI.escapeHTML by reducing buffer extensionTakashi Kokubun2019-06-051-49/+36
| | | | | | | | | | | | | | | and switch-case branches. Buffer allocation optimization using `ALLOCA_N` would be the main benefit of patch. It eliminates the O(N) buffer extensions. It also reduces the number of branches using escape table like https://mattn.kaoriya.net/software/lang/c/20160817011915.htm. Closes: https://github.com/ruby/ruby/pull/2226 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Co-authored-by: Yasuhiro MATSUMOTO <mattn.jp@gmail.com>
* * expand tabs.git2019-06-051-29/+29
|
* Revert "Optimize CGI.escapeHTML by reducing buffer extension"Takashi Kokubun2019-06-051-33/+49
| | | | | | | This reverts commit 8d81e59aa7a62652caf85f9c8db371703668c149. `ALLOCA_N` does not check stack overflow unlike ALLOCV. I'll fix it and re-commit it again.
* Optimize CGI.escapeHTML by reducing buffer extensionTakashi Kokubun2019-06-051-49/+33
| | | | | | | | | | | | | | | and switch-case branches. Buffer allocation optimization using `ALLOCA_N` would be the main benefit of patch. It eliminates the O(N) buffer extensions. It also reduces the number of branches using escape table like https://mattn.kaoriya.net/software/lang/c/20160817011915.htm. Closes: https://github.com/ruby/ruby/pull/2226 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Co-authored-by: Yasuhiro MATSUMOTO <mattn.jp@gmail.com>
* Make psych.so deterministicJeremy Evans2019-06-021-1/+1
| | | | Fixes Ruby Bug #15890
* 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