summaryrefslogtreecommitdiff
path: root/spec/ruby/language
AgeCommit message (Collapse)Author
2020-02-28Update to ruby/spec@41bf282Benoit Daloze
2020-02-23Warn non-nil `$/` [Feature #14240]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2920
2020-02-11Make yield in singleton class definitions in methods a SyntaxErrorJeremy Evans
This behavior was deprecated in 2.7 and scheduled to be removed in 3.0. Calling yield in a class definition outside a method is now a SyntaxError instead of a LocalJumpError, as well. Notes: Merged: https://github.com/ruby/ruby/pull/2901
2020-01-28Update to ruby/spec@f8a2d54Benoit Daloze
2020-01-28Fix some spec breakage on 2.7 related to keyword argumentsJeremy Evans
These specs were probably added in the commit to fully separate keyword arguments after the release of 2.7.0, but apparently not tested on 2.7 before hand. The enclosing ruby_version guard for these specs limits them to 2.7.
2020-01-15Update version guardKazuhiro NISHIYAMA
fix up 98ef38ada43338c073f50a0093196f0356284625
2020-01-15Freeze Regexp literalsJean Boussier
[Feature #8948] [Feature #16377] Since Regexp literals always reference the same instance, allowing to mutate them can lead to state leak. Notes: Merged: https://github.com/ruby/ruby/pull/2705
2020-01-02Update specs for keyword argument separationJeremy Evans
Notes: Merged: https://github.com/ruby/ruby/pull/2794
2019-12-27Update to ruby/spec@d419e74Benoit Daloze
2019-12-20Fixed misspellingsNobuyoshi Nakada
Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
2019-11-30Update to ruby/spec@4eec3dcBenoit Daloze
2019-11-18Deprecate taint/trust and related methods, and make the methods no-opsJeremy Evans
This removes the related tests, and puts the related specs behind version guards. This affects all code in lib, including some libraries that may want to support older versions of Ruby. Notes: Merged: https://github.com/ruby/ruby/pull/2476
2019-11-18Warn on access/modify of $SAFE, and remove effects of modifying $SAFEJeremy Evans
This removes the security features added by $SAFE = 1, and warns for access or modification of $SAFE from Ruby-level, as well as warning when calling all public C functions related to $SAFE. This modifies some internal functions that took a safe level argument to no longer take the argument. rb_require_safe now warns, rb_require_string has been added as a version that takes a VALUE and does not warn. One public C function that still takes a safe level argument and that this doesn't warn for is rb_eval_cmd. We may want to consider adding an alternative method that does not take a safe level argument, and warn for rb_eval_cmd. Notes: Merged: https://github.com/ruby/ruby/pull/2476
2019-10-17Make circular argument reference a SyntaxError instead of a warningJeremy Evans
Fixes [Bug #10314] Notes: Merged: https://github.com/ruby/ruby/pull/2569
2019-10-02Treat return in block in class/module as LocalJumpError (#2511)Jeremy Evans
return directly in class/module is an error, so return in proc in class/module should also be an error. I believe the previous behavior was an unintentional oversight during the addition of top-level return in 2.4. Notes: Merged-By: jeremyevans <code@jeremyevans.net>
2019-09-29Update to ruby/spec@e69a14cBenoit Daloze
2019-09-29Update to ruby/spec@519df35Benoit Daloze
2019-09-20Allow calling a private accessor with `self.`Nobuyoshi Nakada
[Feature #11297] [Feature #16123] Notes: Merged: https://github.com/ruby/ruby/pull/2474
2019-09-20Added version guardNobuyoshi Nakada
[Feature #11297] [Feature #16123] Notes: Merged: https://github.com/ruby/ruby/pull/2474
2019-09-20Allow calling a private method with `self.`Dylan Thacker-Smith
This makes it consistent with calling private attribute assignment methods, which currently is allowed (e.g. `self.value =`). Calling a private method in this way can be useful when trying to assign the return value to a local variable with the same name. [Feature #11297] [Feature #16123] Notes: Merged: https://github.com/ruby/ruby/pull/2474
2019-08-30Warn for keyword to last hash parameter when method has no optional/rest ↵Jeremy Evans
parameters Previously, there was no warning in this case, even though we will be changing the behavior in Ruby 3. Fixes [Bug #14130]
2019-08-30Update specs to handle non-Symbols for keyword splats in 2.7Jeremy Evans
Also handle some warnings for behavior that will change in 3.0. Notes: Merged: https://github.com/ruby/ruby/pull/2395
2019-08-29Fixed a comment [ci skip]Nobuyoshi Nakada
A range literal in conditional expression is turned into a flip-flop, as a Range object is never falsy and does not make a sense.
2019-08-29Revert "Remove warnings of flip-flop deprecation from tests and specs"Nobuyoshi Nakada
This reverts commit bf7a32d22079cc44eb19794e41d82b886d5d17b3. flip-flop is no longer deprecated. [Feature #5400]
2019-07-29Warn if using return at top-level with an argumentJeremy Evans
Fixes [Bug #14062]
2019-07-27Update to ruby/spec@875a09eBenoit Daloze
2019-07-11Revert "parse.y: Deprecate flip-flops"Nobuyoshi Nakada
This reverts commit bae638ad5b782c44c80efe33834cb9039279af46. [Feature #5400]
2019-06-27Update to ruby/spec@8d74d49Benoit Daloze
2019-05-28Update to ruby/spec@9a501a8Benoit Daloze
2019-04-28Update to ruby/spec@7de852dBenoit Daloze
2019-04-27Update to ruby/spec@15c9619Benoit Daloze
2019-03-28Update to ruby/spec@e81b3cderegon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-11The combination of non-Symbol keys and Symbol keys is now allowed againmame
Revert r64358. [Bug #15658] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-21Update to ruby/spec@7a16e01eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-07Fix specs for yield in singleton class being deprecatederegon
* Use eval to trigger warning only when the method is called. * Suppress warnings and clarify this will be removed in 3.0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-07Update to ruby/spec@6cf8ebeeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-27Update to ruby/spec@e57f49ceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-20Update to ruby/spec@35a9fbaeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10proc.c: proc without blocknobu
* proc.c (proc_new): promoted lambda/proc/Proc.new with no block in a method called with a block to a warning/error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-29Update to ruby/spec@944ea57eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-27Update to ruby/spec@cdd6ff7eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-27Update to ruby/spec@8b743a3eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-25Update to ruby/spec@241f9e7eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-28Update to ruby/spec@6fd9472eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* append newline at EOF.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Update to ruby/spec@007e908eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* append newline at EOF.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Update to ruby/spec@a89819deregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27* append newline at EOF.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-27Update to ruby/spec@09fa86ceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e