aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/language
Commit message (Collapse)AuthorAgeFilesLines
* Add tests for variables in `END` block shared with the toplevelNobuyoshi Nakada2023-01-241-0/+4
|
* Update to ruby/spec@9d69b95Benoit Daloze2023-01-052-2/+7
|
* Skip some examples for Ruby 3.3Hiroshi SHIBATA2022-12-261-1/+1
|
* Update to ruby/spec@740ccc8Benoit Daloze2022-11-073-0/+87
|
* Update to ruby/spec@1d9d5c6Benoit Daloze2022-09-282-200/+186
|
* Update to ruby/spec@d01709fBenoit Daloze2022-08-294-0/+106
|
* Update to ruby/spec@cbfaf51Benoit Daloze2022-07-273-27/+86
|
* Do not have class/module keywords look up ancestors of ObjectJeremy Evans2022-07-211-3/+12
| | | | | | | | Fixes case where Object includes a module that defines a constant, then using class/module keyword to define the same constant on Object itself. Implements [Feature #18832]
* Update to ruby/spec@ab32a1aBenoit Daloze2022-06-264-1/+131
|
* Update to ruby/spec@3affe1eBenoit Daloze2022-04-2524-1844/+1470
|
* Do not autosplat array in block call just because keywords acceptedJeremy Evans2022-03-301-2/+11
| | | | | | | | | | | If the block only accepts a single positional argument plus keywords, then do not autosplat. Still autosplat if the block accepts more than one positional argument in addition to keywords. Autosplatting a single positional argument plus keywords made sense in Ruby 2, since a final positional hash could be used as keywords, but it does not make sense in Ruby 3. Fixes [Bug #18633]
* Update to ruby/spec@aaf998fBenoit Daloze2022-03-281-0/+307
|
* sitelibdir makes no sense in ruby itselfNobuyoshi Nakada2022-03-041-0/+2
|
* Update to ruby/spec@82cd3a3Benoit Daloze2022-03-032-10/+12
|
* spec: skip ext's extension spec for --with-static-linked-extYuta Saito2022-02-281-0/+1
| | | | | `resolve_feature_path` doesn't return .so when the given ext is linked statically by --with-static-linked-ext
* Update to ruby/spec@902ab83Benoit Daloze2022-01-283-6/+56
|
* Fix constant assignment evaluation orderJeremy Evans2022-01-141-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the right hand side was always evaluated before the left hand side for constant assignments. For the following: ```ruby lhs::C = rhs ``` rhs was evaluated before lhs, which is inconsistant with attribute assignment (lhs.m = rhs), and apparently also does not conform to JIS 3017:2013 11.4.2.2.3. Fix this by changing evaluation order. Previously, the above compiled to: ``` 0000 putself ( 1)[Li] 0001 opt_send_without_block <calldata!mid:rhs, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0003 dup 0004 putself 0005 opt_send_without_block <calldata!mid:lhs, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0007 setconstant :C 0009 leave ``` After this change: ``` 0000 putself ( 1)[Li] 0001 opt_send_without_block <calldata!mid:lhs, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0003 putself 0004 opt_send_without_block <calldata!mid:rhs, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0006 swap 0007 topn 1 0009 swap 0010 setconstant :C 0012 leave ``` Note that if expr is not a module/class, then a TypeError is not raised until after the evaluation of rhs. This is because that error is raised by setconstant. If we wanted to raise TypeError before evaluation of rhs, we would have to add a VM instruction for calling vm_check_if_namespace. Changing assignment order for single assignments caused problems in the multiple assignment code, revealing that the issue also affected multiple assignment. Fix the multiple assignment code so left-to-right evaluation also works for constant assignments. Do some refactoring of the multiple assignment code to reduce duplication after adding support for constants. Rename struct masgn_attrasgn to masgn_lhs_node, since it now handles both constants and attributes. Add add_masgn_lhs_node static function for adding data for lhs attribute and constant setting. Fixes [Bug #15928]
* Update to ruby/spec@226cfdcBenoit Daloze2022-01-106-12/+106
|
* s/an Bignum/a Bignum/ [ci skip]Nobuyoshi Nakada2021-12-281-1/+1
|
* Postpone fix of lookbehind with ss characters tentativelyNobuyoshi Nakada2021-12-261-1/+1
|
* [win32] skip example about STDIN encodingsNobuyoshi Nakada2021-12-011-15/+17
|
* Update to ruby/spec@7f22a0bBenoit Daloze2021-11-292-0/+23
|
* Update to ruby/spec@21a48d9Benoit Daloze2021-10-284-0/+79
|
* Update to ruby/spec@d6921efBenoit Daloze2021-10-207-36/+410
|
* Update to ruby/spec@ccf0d85Benoit Daloze2021-10-052-10/+92
|
* Update to ruby/spec@b1e93a2Benoit Daloze2021-09-071-0/+28
|
* Fix test failure on spec/ruby/language/pattern_matching_spec.rbKazuki Tsujimoto2021-08-191-5/+8
| | | | https://github.com/ruby/ruby/runs/3369486308
* Allow omission of parentheses in one line pattern matching [Feature #16182]Kazuki Tsujimoto2021-08-191-0/+11
|
* Update to ruby/spec@330c641Benoit Daloze2021-08-131-0/+4
|
* Update to ruby/spec@b65d01fBenoit Daloze2021-07-299-178/+131
|
* Disable spec of `pattern matching is experimental` since 3.1Kazuhiro NISHIYAMA2021-07-171-14/+16
|
* Update to ruby/spec@a0b7d0dBenoit Daloze2021-06-023-8/+19
|
* Fix handling of control/meta escapes in literal regexpsJeremy Evans2021-05-121-1/+1
| | | | | | | | | | | | | | | | | | | Ruby uses a recursive algorithm for handling control/meta escapes in strings (read_escape). However, the equivalent code for regexps (tokadd_escape) in did not use a recursive algorithm. Due to this, Handling of control/meta escapes in regexp did not have the same behavior as in strings, leading to behavior such as the following returning nil: ```ruby /\c\xFF/ =~ "\c\xFF" ``` Switch the code for handling \c, \C and \M in literal regexps to use the same code as for strings (read_escape), to keep behavior consistent between the two. Fixes [Bug #14367]
* Update to ruby/spec@fd6edddBenoit Daloze2021-03-278-50/+176
|
* Update to ruby/spec@37e52e5Benoit Daloze2021-02-273-0/+151
|
* Fix a spec failureKazuhiro NISHIYAMA2021-02-161-2/+10
| | | | | | | | | | | | http://ci.rvm.jp/logfiles/brlog.trunk-test.20210216-182358 ``` 1) $LOAD_PATH.resolve_feature_path raises LoadError if feature cannot be found FAILED Expected LoadError but no exception was raised (nil was returned) /tmp/ruby/v3/src/trunk-test/spec/ruby/language/predefined_spec.rb:1275:in `block (3 levels) in <top (required)>' /tmp/ruby/v3/src/trunk-test/spec/ruby/language/predefined_spec.rb:1259:in `block in <top (required)>' /tmp/ruby/v3/src/trunk-test/spec/ruby/language/predefined_spec.rb:1258:in `<top (required)>' ```
* Update to ruby/spec@8cafaa5Benoit Daloze2021-01-284-4/+46
|
* Update to ruby/spec@4ce9f41Benoit Daloze2020-12-279-6/+344
|
* Use Integer instead of Fixnum/BignumNobuyoshi Nakada2020-12-216-11/+11
|
* Don't emit warning when the pattern of one-line pattern matching is just a ↵Kazuki Tsujimoto2020-12-131-2/+2
| | | | | | variable pattern https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20201210Japan.md#feature-17371-reintroduce-expr-in-pat-ktsj
* spec: suppress deprecations of "lambda(&proc_block)" patternYusuke Endoh2020-12-121-4/+8
|
* Update to ruby/spec@ac878adBenoit Daloze2020-11-273-1/+19
|
* Improve error message when subclassing non-ClassJeremy Evans2020-11-131-1/+1
| | | | Fixes [Bug #14726]
* Update to ruby/spec@b0b7f53Benoit Daloze2020-11-131-0/+22
|
* Fix indentationKazuki Tsujimoto2020-11-071-187/+187
|
* Fix and remove spec testing undefined behaviorKazuki Tsujimoto2020-11-071-34/+8
|
* Use the suppress_warning helper instead of doing it manuallyKazuki Tsujimoto2020-11-011-4/+1
|
* Suppress "One-line pattern matching is experimental" warningKazuki Tsujimoto2020-11-011-4/+9
|
* Fix Rubyspec (ruby-2.7) failuresKazuki Tsujimoto2020-11-011-6/+14
| | | | https://github.com/ruby/ruby/runs/1337845174
* use one-line pattern matching for warning testsKoichi Sasada2020-11-011-4/+2
|