aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/language
Commit message (Collapse)AuthorAgeFilesLines
* Fixed misspellingsNobuyoshi Nakada2019-12-201-1/+1
| | | | Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
* Update to ruby/spec@4eec3dcBenoit Daloze2019-11-302-0/+23
|
* Deprecate taint/trust and related methods, and make the methods no-opsJeremy Evans2019-11-181-13/+15
| | | | | | 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.
* Warn on access/modify of $SAFE, and remove effects of modifying $SAFEJeremy Evans2019-11-182-102/+101
| | | | | | | | | | | | | | | | | 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.
* Make circular argument reference a SyntaxError instead of a warningJeremy Evans2019-10-173-34/+85
| | | | Fixes [Bug #10314]
* Treat return in block in class/module as LocalJumpError (#2511)Jeremy Evans2019-10-021-10/+11
| | | | | | 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.
* Update to ruby/spec@e69a14cBenoit Daloze2019-09-291-0/+55
|
* Update to ruby/spec@519df35Benoit Daloze2019-09-296-66/+33
|
* Allow calling a private accessor with `self.`Nobuyoshi Nakada2019-09-202-1/+3
| | | | [Feature #11297] [Feature #16123]
* Added version guardNobuyoshi Nakada2019-09-201-4/+12
| | | | [Feature #11297] [Feature #16123]
* Allow calling a private method with `self.`Dylan Thacker-Smith2019-09-201-1/+1
| | | | | | | | | | 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]
* Warn for keyword to last hash parameter when method has no optional/rest ↵Jeremy Evans2019-08-301-4/+12
| | | | | | | | | parameters Previously, there was no warning in this case, even though we will be changing the behavior in Ruby 3. Fixes [Bug #14130]
* Update specs to handle non-Symbols for keyword splats in 2.7Jeremy Evans2019-08-304-148/+376
| | | | Also handle some warnings for behavior that will change in 3.0.
* Fixed a comment [ci skip]Nobuyoshi Nakada2019-08-291-1/+1
| | | | | | 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.
* Revert "Remove warnings of flip-flop deprecation from tests and specs"Nobuyoshi Nakada2019-08-292-14/+9
| | | | | | | | This reverts commit bf7a32d22079cc44eb19794e41d82b886d5d17b3. flip-flop is no longer deprecated. [Feature #5400]
* Warn if using return at top-level with an argumentJeremy Evans2019-07-291-6/+19
| | | | Fixes [Bug #14062]
* Update to ruby/spec@875a09eBenoit Daloze2019-07-2751-359/+359
|
* Revert "parse.y: Deprecate flip-flops"Nobuyoshi Nakada2019-07-111-12/+0
| | | | | | This reverts commit bae638ad5b782c44c80efe33834cb9039279af46. [Feature #5400]
* Update to ruby/spec@8d74d49Benoit Daloze2019-06-277-19/+38
|
* Update to ruby/spec@9a501a8Benoit Daloze2019-05-281-0/+4
|
* Update to ruby/spec@7de852dBenoit Daloze2019-04-282-138/+124
|
* Update to ruby/spec@15c9619Benoit Daloze2019-04-2715-135/+122
|
* Update to ruby/spec@e81b3cderegon2019-03-284-0/+34
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* The combination of non-Symbol keys and Symbol keys is now allowed againmame2019-03-112-90/+30
| | | | | | Revert r64358. [Bug #15658] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@7a16e01eregon2019-02-217-92/+97
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix specs for yield in singleton class being deprecatederegon2019-02-071-2/+6
| | | | | | | * 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
* Update to ruby/spec@6cf8ebeeregon2019-02-0712-16/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@e57f49ceregon2019-01-271-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@35a9fbaeregon2019-01-205-8/+139
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: proc without blocknobu2019-01-101-8/+19
| | | | | | | * 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
* Update to ruby/spec@944ea57eregon2018-12-291-0/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@cdd6ff7eregon2018-11-272-6/+31
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@8b743a3eregon2018-10-272-0/+31
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@241f9e7eregon2018-09-253-1/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@6fd9472eregon2018-08-284-3/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * append newline at EOF.svn2018-08-271-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@007e908eregon2018-08-273-16/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * append newline at EOF.svn2018-08-271-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@a89819deregon2018-08-273-4/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * append newline at EOF.svn2018-08-272-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@09fa86ceregon2018-08-2724-42/+266
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@dd828d6eregon2018-08-212-1/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix typo in version guarderegon2018-08-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* non-symbol keys in kwargsnobu2018-08-142-30/+92
| | | | | | | | * class.c (separate_symbol): [EXPERIMENTAL] non-symbol key in keyword arguments hash causes an exception now. c.f. https://twitter.com/yukihiro_matz/status/1022287578995646464 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@9be7c7eeregon2018-08-034-9/+60
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* const_missing on private constantsnobu2018-07-061-0/+12
| | | | | | | | * variable.c (rb_const_search): call #const_missing method on private constants, as well as uninitialized constants. [Feature #14328] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove unused variablekazu2018-07-011-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@a454137eregon2018-06-271-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@41068a6eregon2018-06-272-6/+4
| | | | | | * Only small fixes to specs from CRuby to review the diff more easily. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* describe about NameError by #private_constantnobu2018-06-191-0/+35
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e