aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* compile.c: avoid newarraykwsplat for argumentsv2_7_0_rc2Yusuke Endoh2019-12-222-1/+14
| | | | | | | | | | | | | | `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]
* Move stats under a dictNARUSE, Yui2019-12-221-6/+7
|
* Should return "." for File.extname("file.") also on WindowsNAKAMURA Usaku2019-12-224-15/+23
| | | | | But not changes another cases, such as "file.rb." [Bug #15267]
* * 2019-12-22 [ci skip]git2019-12-221-1/+1
|
* Remove TODO commentaycabta2019-12-221-1/+1
|
* [ruby/irb] Make nesting level up for `1.times do`Yusuke Endoh2019-12-221-1/+1
| | | | | | Follow up of the previous commit https://github.com/ruby/irb/commit/ab207353d3
* [ruby/irb] Fix auto-indent for `1.times do`Yusuke Endoh2019-12-221-1/+1
| | | | | | Fixes #47 https://github.com/ruby/irb/commit/6b8eca4635
* [ruby/reline] Preserve the input buffer across cursor_posYusuke Endoh2019-12-221-1/+5
| | | | | | | | | 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
* [ruby/reline] Consider Reline::ANSI.input at prepNobuyoshi Nakada2019-12-221-7/+16
| | | | https://github.com/ruby/reline/commit/b111cde3c3
* Kernel#lambda: return forwarded block as non-lambda procAlan Wu2019-12-214-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | 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]
* Add spec for capturing Kernel#lambda with Kernel#methodAlan Wu2019-12-211-0/+7
|
* Add specs for calling into Kernel#lambda with superAlan Wu2019-12-212-1/+38
|
* test/ruby/test_pattern_matching.rb: suppress "unused variable" warningYusuke Endoh2019-12-211-0/+17
|
* Add Array#minmax, Range#minmax, and Proc#ruby2_keywords to NEWSJeremy Evans2019-12-201-1/+20
|
* * 2019-12-21 [ci skip]git2019-12-211-1/+1
|
* Added `-W:experimental` command line optionNobuyoshi Nakada2019-12-202-0/+9
| | | | [Feature #16420]
* Added `experimental` warning categoryNobuyoshi Nakada2019-12-205-5/+29
| | | | [Feature #16420]
* Hoisted out new_case3Nobuyoshi Nakada2019-12-201-4/+12
|
* Added -W: command line optionNobuyoshi Nakada2019-12-203-1/+45
| | | | | To manage `Warning[category]` flags. Only `-W:deprecated` and `-W:no-deprecated` are available now. [Feature #16345]
* Added `FEATURE_SET_RESTORE` macroNobuyoshi Nakada2019-12-201-1/+2
|
* NEWS: Update the explanation of pattern matchingYusuke Endoh2019-12-201-4/+14
| | | | | | Add an example of "<expr> in <pattern>", an example of NoMatchingPatternError, and mention that the slides are slightly obsolete.
* vm_args.c: rephrase the warning message of keyword argument separationYusuke Endoh2019-12-2012-357/+357
| | | | | | | | | | (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
* Refined the warning message for $, and $;Nobuyoshi Nakada2019-12-203-3/+3
| | | | [Bug #16438]
* Refined the warning message for numbered-parameter like variablesNobuyoshi Nakada2019-12-203-3/+3
| | | | [Bug #16438]
* Refined the warning message for numbered-parameter like variablesNobuyoshi Nakada2019-12-202-7/+8
| | | | [Bug #16438]
* Makes the receiver to FrozenError.new a keyword parameterNobuyoshi Nakada2019-12-203-10/+17
| | | | [Feature #16419]
* use UTC to use previous day in midnightNARUSE, Yui2019-12-201-2/+2
|
* Fixed misspellingsNobuyoshi Nakada2019-12-2028-39/+39
| | | | Fixed misspellings reported at [Bug #16437], for default gems.
* Merge RubyGems 3.1.2Hiroshi SHIBATA2019-12-206-58/+145
|
* shell.rb is no longer bundled [ci skip]Nobuyoshi Nakada2019-12-201-335/+0
|
* Fixed misspellingsNobuyoshi Nakada2019-12-2045-79/+79
| | | | Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
* Warn also numbered parameter like methodsNobuyoshi Nakada2019-12-202-0/+5
|
* Add `URI#open` to warning messageKazuhiro NISHIYAMA2019-12-201-1/+1
|
* * 2019-12-20 [ci skip]git2019-12-201-1/+1
|
* Warn also numbered parameter like parametersNobuyoshi Nakada2019-12-203-5/+13
| | | | [Feature #16433]
* Added rb_warn_deprecatedNobuyoshi Nakada2019-12-196-13/+30
|
* Manage deprecation warnings about keyword argumentNobuyoshi Nakada2019-12-192-0/+5
|
* Made the warning for deprecated constants follow the category flagNobuyoshi Nakada2019-12-194-9/+28
|
* Adjusted the formatNobuyoshi Nakada2019-12-191-2/+4
|
* * 2019-12-19 [ci skip]git2019-12-191-1/+1
|
* Refactor free page insertionAaron Patterson2019-12-181-7/+7
| | | | | | | | | | | 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.
* Merge bundler-2.1.1 from bundler/bundlerHiroshi SHIBATA2019-12-185-13/+23
|
* delete rb_vm_call()卜部昌平2019-12-182-8/+0
| | | | Nobody uses it any longer.
* describe mc_miss_reuse_call [ci skip]卜部昌平2019-12-181-0/+1
|
* Use a temporary file for chown testNobuyoshi Nakada2019-12-181-5/+3
| | | | | Errno::EROFS may occur when the source tree is placed in a read-only filesystem.
* [ruby/io-console] Skip Interrupt test on LinuxNobuyoshi Nakada2019-12-181-1/+1
| | | | | | Hangs up only in ruby/ruby on Travis-CI. https://github.com/ruby/io-console/commit/de39aa6dd6
* per-method serial number卜部昌平2019-12-186-6/+9
| | | | | | | | | | | | | | | | | 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.
* [ruby/io-console] Set raw mode strictly same as cfmakerawNobuyoshi Nakada2019-12-182-3/+5
| | | | | | | | | | * 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
* Skip optimized method check for most method IDsJohn Hawthorn2019-12-173-2/+24
| | | | | | | | | | | 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.
* Replace debug test with assertionJohn Hawthorn2019-12-171-4/+1
| | | | | It's a Ruby bug if this ever happens check it as an assertion instead of paying the cost of the check every time.