summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-12-04Make {Method,UnboundMethod}#super_method handle clone/bind/unbindJeremy Evans
This wasn't working previously because the iclass entry wasn't being copied, and without an iclass entry, super_method returns nil. Fixes [Bug #15629] Notes: Merged: https://github.com/ruby/ruby/pull/2723
2019-12-04compile.c: trivial refactoringYusuke Endoh
Use `for` instead of `while` to make it explicit that it is a traverse of bytecode.
2019-12-04Revert "Regexp#match{?} with nil raises TypeError as String, Symbol (#1506)"NARUSE, Yui
This reverts commit 2a22a6b2d8465934e75520a7fdcf522d50890caf. Revert [Feature #13083]
2019-12-04Revert "Revert nil error and adding deprecation message"NARUSE, Yui
This reverts commit 452bee3ee8d68059fabd9b1c7a75661b14e3933e.
2019-12-04Revert "Improve warning message"NARUSE, Yui
This reverts commit 31110d820cc1258cbc84b46ecc65b254c7d5529a.
2019-12-04Revert "Fix warnings in Regexp#{match,match?} specs"NARUSE, Yui
This reverts commit 782d1b8fb0a039cedef9ad9c94f432dad51901e6.
2019-12-03Make Enumerator::Chain#each treat lambdas as lambdaJeremy Evans
Previously, lambdas were converted to procs because of how rb_block_call works. Switch to rb_funcall_with_block, which handles procs as procs and lambdas as lambdas. Fixes [Bug #15613] Notes: Merged: https://github.com/ruby/ruby/pull/2720
2019-12-03Do not lose existing constant visibility when autoloadingJeremy Evans
This copies the private/deprecate constant visibility across the autoload. It still is backwards compatible with setting the private/deprecate constant visibility in the autoloaded file. However, if you explicitly set public constant in the autoloaded file, that will be reset after the autoload. Fixes [Bug #11055] Notes: Merged: https://github.com/ruby/ruby/pull/2716
2019-12-04* 2019-12-04 [ci skip]git
2019-12-03Check interrupts before starting threadJeremy Evans
Fixes a hang when Thread.new calls Thread.new in a loop. Fixes [Bug #13688] Notes: Merged: https://github.com/ruby/ruby/pull/2715
2019-12-03fix typoKOSAKI Motohiro
2019-12-03vm_args.c: make the keyword deprecation message helpfulYusuke Endoh
``` $ ./miniruby -e 'def foo(kw: 1); end; h = {kw: 1}; foo(h)' -e:1: warning: The last argument is used as the keyword parameter -e:1: warning: for `foo' defined here; maybe ** should be added to the call? ```
2019-12-03tool/lib/test/unit/parallel.rb: fail explicitly when failing to get ioYusuke Endoh
`(ulimit -n 30; make test-tool)` fails with unexplicit message: "undefined method `write' for nil:NilClass" due to lack of stdout. This change makes it explicit. [Bug #5577]
2019-12-03Fixed the inverted conditionNobuyoshi Nakada
2019-12-03Wrap statements in AS_IF properlyNobuyoshi Nakada
2019-12-03Fix auto-indent behavior correctlyaycabta
2019-12-03Fixed stack overflow [Bug #16382]Nobuyoshi Nakada
Get rid of infinite recursion in expanding a load path to the real path while loading a transcoder. Notes: Merged: https://github.com/ruby/ruby/pull/2714
2019-12-03mjit.c: fix a mismatch of malloc'ed typeYusuke Endoh
Coverity Scan found this issue.
2019-12-02Make more attempts to check for the precision of Process.timesBenoit Daloze
* Process.clock_getres specs use 10_000 but that's quite slow for the Process.times spec.
2019-12-03* 2019-12-03 [ci skip]git
2019-12-03Support incremental search by last determined wordaycabta
In the incremental search by C-r, search word is saved when it's determined. In the next incremental search by C-r, if a user presses C-r again with the empty search word, the determined previous search word is used to search.
2019-12-03The C-r in vi command mode is also incremental searchaycabta
2019-12-02Fix random failure on getusage-missing environmentsTakashi Kokubun
`* 1e6` makes a spurious result about floating point number's precision. ``` irb(main)[01:0]> 16.028 => 16.028 irb(main)[02:0]> (16.028 * 1e6) => 16027999.999999998 ```
2019-12-02Fix Leaked file descriptor in test/did_you_meanKazuhiro NISHIYAMA
https://github.com/ruby/ruby/commit/de74d2c3b0005048a2c4433bde68b9be10c86f01/checks?check_suite_id=336910877#step:19:131 ``` Leaked file descriptor: NameErrorExtensionTest#test_correctable_error_objects_are_dumpable: 7 : #<File:test_name_error_extension.rb> ``` Notes: Merged: https://github.com/ruby/ruby/pull/2712
2019-12-01Debug random failure of ruby-spec on ci.rvm.jpTakashi Kokubun
2019-12-02Revert "builtin_binary.inc needs miniruby itself for RubyVM.each_builtin"Nobuyoshi Nakada
This reverts commit 2615030c521afc822c66a7e139ccba3d2365ab56, which doesn't work when cross compiling, except for mingw.
2019-12-02builtin_binary.inc needs miniruby itself for RubyVM.each_builtinNobuyoshi Nakada
2019-12-02Disable _FORTIFY_SOURCE on mingw for nowNobuyoshi Nakada
It causes a link error due to some `__*_chk` functions on mingw.
2019-12-02Wait for the main thread to start reading by QueueNobuyoshi Nakada
Otherwise, the written data to pty before the reading started may be just lost.
2019-12-01Simplify variable declaration by C99Takashi Kokubun
2019-12-02Support incremental search again by C-r in incremental searchaycabta
2019-12-01Check MJIT support in one placeTakashi Kokubun
to fix test failure on trunk-no-mjit https://gist.github.com/ko1/32ab982ffd7555988818773c08f97123
2019-12-01Skip --jit-debug= test on mswinTakashi Kokubun
it fails like https://ci.appveyor.com/project/ruby/ruby/builds/29235837/job/v0apdjj4qx8afars
2019-12-02Process Backspace key in incremental search correctlyaycabta
2019-12-02Search history to back in the middle of historiesaycabta
2019-12-01Avoid unnecessary tzset() callKOSAKI Motohiro
Akatsuki reported ENV['TZ'] = 'UTC' improved 7x-8x faster on following code. t = Time.now; 100000.times { Time.new(2019) }; Time.now - t https://hackerslab.aktsk.jp/2019/12/01/141551 commit 4bc1669127(reduce tzset) dramatically improved this situation. But still, TZ=UTC is faster than default. This patch removs unnecessary tzset() call completely. Performance check ---------------------- test program: t = Time.now; 100000.times { Time.new(2019) }; Time.now - t before: 0.387sec before(w/ TZ): 0.197sec after: 0.162sec after(w/ TZ): 0.165sec OK. Now, Time creation 2x faster *and* TZ=UTC doesn't improve anything. We can forget this hack completely. :) Side note: This patch slightly changes Time.new(t) behavior implicitly. Before this patch, it might changes default timezone implicitly. But after this patch, it doesn't. You need to reset TZ (I mean ENV['TZ'] = nil) explicitly. But I don't think this is big impact. Don't try to change /etc/localtime on runtime. Side note2: following test might be useful for testing "ENV['TZ'] = nil". ----------------------------------------- % cat <<'End' | sudo sh -s rm -f /etc/localtime-; cp -a /etc/localtime /etc/localtime- rm /etc/localtime; ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime ./ruby -e ' p Time.new(2000).zone # JST File.unlink("/etc/localtime"); File.symlink("/usr/share/zoneinfo/America/Los_Angeles", "/etc/localtime") p Time.new(2000).zone # JST (ruby does not follow /etc/localtime modification automatically) ENV["TZ"] = nil p Time.new(2000).zone # PST (ruby detect /etc/localtime modification) ' rm /etc/localtime; cp -a /etc/localtime- /etc/localtime; rm /etc/localtime- End
2019-12-02* 2019-12-02 [ci skip]git
2019-12-02Remove obsolete codeaycabta
2019-12-01The ed_search_prev_history should always search to backwardaycabta
2019-12-01Reline::HISTORY can take Range objectaycabta
2019-12-01Update to ruby/spec@dcf4955Benoit Daloze
2019-12-01Update to ruby/mspec@aa28e95Benoit Daloze
2019-12-01[ruby/spec] Fix failures with LC_ALL=CNobuyoshi Nakada
https://github.com/ruby/spec/commit/51047687c0 https://github.com/ruby/spec/commit/2b87b467cc
2019-12-01Constified mjit_initNobuyoshi Nakada
2019-12-01ConstifiedNobuyoshi Nakada
2019-12-01Fix a mistake excluding NULL in the endTakashi Kokubun
2019-12-01Workaround missing strndup on WindowsTakashi Kokubun
https://ci.appveyor.com/project/ruby/ruby/builds/29230976/job/c910t37313edb97k
2019-12-01Use build dir for testing --jit-debugTakashi Kokubun
to fix failure like https://github.com/ruby/ruby/runs/327745536
2019-12-01Allow specifying arbitrary MJIT flags by --jit-debugTakashi Kokubun
This is a secret feature for me. It's only for testing and any behavior with this flag override is unsupported. I needed this because I sometimes want to add debug options but do not want to disable optimizations, for using Linux perf.
2019-12-01Fixed type of an index variableNobuyoshi Nakada