summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-12-22compile.c: avoid newarraykwsplat for argumentsv2_7_0_rc2Yusuke Endoh
`foo(*rest, post, **empty_kw)` is compiled like `foo(*rest + [post, **empty_kw])`, and `**empty_kw` is removed by "newarraykwsplat" instruction. However, the method call still has a flag of KW_SPLAT, so "post" is considered as a keyword hash, which caused a segfault. Note that the flag cannot be removed if "empty_kw" is not always empty. This change fixes the issue by compiling arguments with "newarray" instead of "newarraykwsplat". [Bug #16442]
2019-12-22Move stats under a dictNARUSE, Yui
2019-12-22Should return "." for File.extname("file.") also on WindowsNAKAMURA Usaku
But not changes another cases, such as "file.rb." [Bug #15267]
2019-12-22* 2019-12-22 [ci skip]git
2019-12-22Remove TODO commentaycabta
2019-12-22[ruby/irb] Make nesting level up for `1.times do`Yusuke Endoh
Follow up of the previous commit https://github.com/ruby/irb/commit/ab207353d3
2019-12-22[ruby/irb] Fix auto-indent for `1.times do`Yusuke Endoh
Fixes #47 https://github.com/ruby/irb/commit/6b8eca4635
2019-12-22[ruby/reline] Preserve the input buffer across cursor_posYusuke Endoh
The old version of cursor_pos discards the input buffer, which made IRB ignore the input immediately after IRB is invoked. This change keeps the input before cursor_pos by using ungetc. https://github.com/ruby/reline/commit/4a8cca331f
2019-12-22[ruby/reline] Consider Reline::ANSI.input at prepNobuyoshi Nakada
https://github.com/ruby/reline/commit/b111cde3c3
2019-12-21Kernel#lambda: return forwarded block as non-lambda procAlan Wu
Before this commit, Kernel#lambda can't tell the difference between a directly passed literal block and one passed with an ampersand. A block passed with an ampersand is semantically speaking already a non-lambda proc. When Kernel#lambda receives a non-lambda proc, it should simply return it. Implementation wise, when the VM calls a method with a literal block, it places the code for the block on the calling control frame and passes a pointer (block handler) to the callee. Before this commit, the VM forwards block arguments by simply forwarding the block handler, which leaves the slot for block code unused when a control frame forwards its block argument. I use the vacant space to indicate that a frame has forwarded its block argument and inspect that in Kernel#lambda to detect forwarded blocks. This is a very ad-hoc solution and relies *heavily* on the way block passing works in the VM. However, it's the most self-contained solution I have. [Bug #15620] Notes: Merged: https://github.com/ruby/ruby/pull/2289
2019-12-21Add spec for capturing Kernel#lambda with Kernel#methodAlan Wu
Notes: Merged: https://github.com/ruby/ruby/pull/2289
2019-12-21Add specs for calling into Kernel#lambda with superAlan Wu
Notes: Merged: https://github.com/ruby/ruby/pull/2289
2019-12-21test/ruby/test_pattern_matching.rb: suppress "unused variable" warningYusuke Endoh
2019-12-20Add Array#minmax, Range#minmax, and Proc#ruby2_keywords to NEWSJeremy Evans
2019-12-21* 2019-12-21 [ci skip]git
2019-12-20Added `-W:experimental` command line optionNobuyoshi Nakada
[Feature #16420]
2019-12-20Added `experimental` warning categoryNobuyoshi Nakada
[Feature #16420]
2019-12-20Hoisted out new_case3Nobuyoshi Nakada
2019-12-20Added -W: command line optionNobuyoshi Nakada
To manage `Warning[category]` flags. Only `-W:deprecated` and `-W:no-deprecated` are available now. [Feature #16345]
2019-12-20Added `FEATURE_SET_RESTORE` macroNobuyoshi Nakada
2019-12-20NEWS: Update the explanation of pattern matchingYusuke Endoh
Add an example of "<expr> in <pattern>", an example of NoMatchingPatternError, and mention that the slides are slightly obsolete.
2019-12-20vm_args.c: rephrase the warning message of keyword argument separationYusuke Endoh
(old) test.rb:4: warning: The last argument is used as the keyword parameter test.rb:1: warning: for `foo' defined here; maybe ** should be added to the call? (new) test.rb:4: warning: The last argument is used as keyword parameters; maybe ** should be added to the call test.rb:1: warning: The called method `foo' is defined here
2019-12-20Refined the warning message for $, and $;Nobuyoshi Nakada
[Bug #16438]
2019-12-20Refined the warning message for numbered-parameter like variablesNobuyoshi Nakada
[Bug #16438]
2019-12-20Refined the warning message for numbered-parameter like variablesNobuyoshi Nakada
[Bug #16438]
2019-12-20Makes the receiver to FrozenError.new a keyword parameterNobuyoshi Nakada
[Feature #16419]
2019-12-20use UTC to use previous day in midnightNARUSE, Yui
2019-12-20Fixed misspellingsNobuyoshi Nakada
Fixed misspellings reported at [Bug #16437], for default gems.
2019-12-20Merge RubyGems 3.1.2Hiroshi SHIBATA
2019-12-20shell.rb is no longer bundled [ci skip]Nobuyoshi Nakada
2019-12-20Fixed misspellingsNobuyoshi Nakada
Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
2019-12-20Warn also numbered parameter like methodsNobuyoshi Nakada
2019-12-20Add `URI#open` to warning messageKazuhiro NISHIYAMA
2019-12-20* 2019-12-20 [ci skip]git
2019-12-20Warn also numbered parameter like parametersNobuyoshi Nakada
[Feature #16433]
2019-12-19Added rb_warn_deprecatedNobuyoshi Nakada
2019-12-19Manage deprecation warnings about keyword argumentNobuyoshi Nakada
2019-12-19Made the warning for deprecated constants follow the category flagNobuyoshi Nakada
2019-12-19Adjusted the formatNobuyoshi Nakada
2019-12-19* 2019-12-19 [ci skip]git
2019-12-18Refactor free page insertionAaron Patterson
I am trying to fix this error: http://ci.rvm.jp/results/trunk-gc_compact@silicon-docker/2491596 Somehow we have a page in the `free_pages` list that is full. This commit refactors the code so that any time we add a page to the `free_pages` list, we do it via `heap_add_freepage`. That function then asserts that the free slots on that page are not 0.
2019-12-18Merge bundler-2.1.1 from bundler/bundlerHiroshi SHIBATA
2019-12-18delete rb_vm_call()卜部昌平
Nobody uses it any longer.
2019-12-18describe mc_miss_reuse_call [ci skip]卜部昌平
2019-12-18Use a temporary file for chown testNobuyoshi Nakada
Errno::EROFS may occur when the source tree is placed in a read-only filesystem.
2019-12-18[ruby/io-console] Skip Interrupt test on LinuxNobuyoshi Nakada
Hangs up only in ruby/ruby on Travis-CI. https://github.com/ruby/io-console/commit/de39aa6dd6
2019-12-18per-method serial number卜部昌平
Methods and their definitions can be allocated/deallocated on-the-fly. One pathological situation is when a method is deallocated then another one is allocated immediately after that. Address of those old/new method entries/definitions can be the same then, depending on underlying malloc/free implementation. So pointer comparison is insufficient. We have to check the contents. To do so we introduce def->method_serial, which is an integer unique to that specific method definition. PS: Note that method_serial being uintptr_t rather than rb_serial_t is intentional. This is because rb_serial_t can be bigger than a pointer on a 32bit system (rb_serial_t is at least 64bit). In order to preserve old packing of struct rb_call_cache, rb_serial_t is inappropriate. Notes: Merged: https://github.com/ruby/ruby/pull/2759
2019-12-18[ruby/io-console] Set raw mode strictly same as cfmakerawNobuyoshi Nakada
* Default VMIN and VTIME to minimum input. * Disable parity check bits explicitly. * Disable all bits for flow control on input. Co-Authored-By: NARUSE, Yui <naruse@airemix.jp> https://github.com/ruby/io-console/commit/5ce201a686
2019-12-17Skip optimized method check for most method IDsJohn Hawthorn
Previously every time a method was defined on a module, we would recursively walk all subclasses to see if the module was included in a class which the VM optimizes for (such as Integer#+). For most method definitions we can tell immediately that this won't be the case based on the method's name. To do this we just keep a hash with method IDs of optimized methods and if our new method isn't in that list we don't need to check subclasses at all. Notes: Merged: https://github.com/ruby/ruby/pull/2752
2019-12-17Replace debug test with assertionJohn Hawthorn
It's a Ruby bug if this ever happens check it as an assertion instead of paying the cost of the check every time. Notes: Merged: https://github.com/ruby/ruby/pull/2752