aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [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.
* Check type with BUILTIN_TYPE in method cache clearJohn Hawthorn2019-12-171-1/+1
| | | | | | We know that this is a heap-allocated object (a CLASS, MODULE, or ICLASS) so we don't need to check if it is an immediate value. This should be very slightly faster.
* Define PREV_CLASS_SERIALJohn Hawthorn2019-12-172-1/+2
| | | | | | | | Avoids genereating a "throwaway" sentinel class serial. There wasn't any read harm in doing so (we're at no risk of exhaustion and there'd be no measurable performance impact), but if feels cleaner that all class serials actually end up assigned and used (especially now that we won't overwrite them in a single method definition).
* Avoid revisiting seen nodes clearing method cacheJohn Hawthorn2019-12-171-1/+7
| | | | | | | | | | | | | | | | | | rb_clear_method_cache_by_class calls rb_class_clear_method_cache recursively on subclasses, where it will bump the class serial and clear some other data (callable_m_tbl, and some mjit data). Previously this could end up taking a long time to clear all the classes if the module was included a few levels deep and especially if there were multiple paths to it in the dependency tree (ie. a class includes two modules which both include the same other module) as we end up revisiting class/iclass/module objects multiple times. This commit avoids revisiting the same object, by short circuiting when revisit the same object. We can check this efficiently by comparing the class serial of each object we visit with the next class serial at the start. We know that any objects with a higher class serial have already been visited.
* * 2019-12-18 [ci skip]v2_7_0_rc1git2019-12-181-1/+1
|
* Revert "Skip interruptible raw mode test on Travis-CI"Nobuyoshi Nakada2019-12-181-1/+0
| | | | This reverts commit 65731a1330ed02691e3c343d2feeb8d0a72af3fd.
* [ruby/io-console] Skip interruptNobuyoshi Nakada2019-12-181-1/+1
| | | | https://github.com/ruby/io-console/commit/8ed5a2bcc3