Skip to content

Commit

Permalink
Add tags for failing language specs
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Nov 6, 2020
1 parent de71fac commit 107863c
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/tags/language/block_tags.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
fails:A block yielded a single Array when non-symbol keys are in a keyword arguments Hash raises an ArgumentError
fails:A block yielded a single Array calls #to_hash on the argument but ignores result when optional argument and keyword argument accepted
fails:Post-args with optional args with a circular argument reference raises a SyntaxError if using an existing local with the same name as the argument
fails:Post-args with optional args with a circular argument reference raises a SyntaxError if there is an existing method with the same name as the argument
1 change: 1 addition & 0 deletions spec/tags/language/comment_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:The comment can be placed between fluent dot now
1 change: 1 addition & 0 deletions spec/tags/language/def_tags.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
fails:An instance method raises FrozenError with the correct class name
fails:A singleton method definition raises FrozenError with the correct class name
fails:An instance method with a default argument raises a syntaxError an existing method with the same name as the local variable
3 changes: 3 additions & 0 deletions spec/tags/language/delegation_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fails:delegation with def(...) delegates rest and kwargs
fails:delegation with def(...) delegates block
fails:delegation with def(...) parses as open endless Range when brackets are omitted
1 change: 1 addition & 0 deletions spec/tags/language/hash_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:Hash literal allows splatted elements keys that are not symbols
3 changes: 3 additions & 0 deletions spec/tags/language/lambda_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fails:A lambda literal -> () { } assigns variables from parameters with circular optional argument reference raises a SyntaxError if using an existing local with the same name as the argument
fails:A lambda literal -> () { } assigns variables from parameters with circular optional argument reference raises a SyntaxError if there is an existing method with the same name as the argument
fails:A lambda expression 'lambda { ... }' with an implicit block raises ArgumentError
6 changes: 6 additions & 0 deletions spec/tags/language/method_tags.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ fails:A method assigns local variables from method parameters for definition 'de
fails:A method assigns local variables from method parameters for definition 'def m(*, **k) k end'
fails:A method assigns local variables from method parameters for definition 'def m(a = nil, **k) [a, k] end'
fails:A method assigns local variables from method parameters for definition 'def m(*a, **k) [a, k] end'
fails:A method assigns local variables from method parameters for definition 'def m(**k); k end;'
fails:A method assigns local variables from method parameters for definition 'def m(a:, **) a end'
fails:A method assigns local variables from method parameters for definition 'def m(a:, **k) [a, k] end'
fails:A method assigns local variables from method parameters for definition 'def m(a, **nil); a end;'
fails:A method when passing an empty keyword splat to a method that does not accept keywords for definition 'def m(*a); a; end'
fails:A method when passing an empty keyword splat to a method that does not accept keywords for definition 'def m(a); a; end'
7 changes: 7 additions & 0 deletions spec/tags/language/numbered_parameters_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fails:Numbered parameters provides default parameters _1, _2, ... in a block
fails:Numbered parameters assigns nil to not passed parameters
fails:Numbered parameters supports variables _1-_9 only for the first 9 passed parameters
fails:Numbered parameters can not be used in both outer and nested blocks at the same time
fails:Numbered parameters warns when numbered parameter is overwritten with local variable
fails:Numbered parameters raises SyntaxError when block parameters are specified explicitly
fails:Numbered parameters affects block arity
2 changes: 2 additions & 0 deletions spec/tags/language/predefined_tags.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ slow:The predefined global constant ARGV contains Strings encoded in locale Enco
slow:Global variable $0 is the path given as the main script and the same as __FILE__
slow:Global variable $? is thread-local
slow:Global variable $0 actually sets the program name
fails:Predefined global $, warns if assigned non-nil
fails:Predefined global $; warns if assigned non-nil
1 change: 1 addition & 0 deletions spec/tags/language/range_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:Literal Ranges creates beginless ranges
1 change: 1 addition & 0 deletions spec/tags/language/rescue_tags.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
fails:The rescue keyword allows 'rescue' in method arguments
fails:The rescue keyword raises SyntaxError when else is used without rescue and ensure
fails:The rescue keyword inline form rescues with multiple assignment
1 change: 1 addition & 0 deletions spec/tags/language/return_tags.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ fails:The return keyword at top level within a block within a class is allowed
fails:The return keyword at top level within a class raises a SyntaxError
fails(escapes the interpreter):The return keyword at top level within a block within a class is not allowed
slow:The return keyword at top level return with argument warns but does not affect exit status
fails:The return keyword at top level return with argument warns but does not affect exit status
2 changes: 2 additions & 0 deletions spec/tags/language/safe_tags.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ fails:The $SAFE variable can be manually lowered
fails:The $SAFE variable is not Proc local
fails:The $SAFE variable is not lambda local
fails:The $SAFE variable is global like regular global variables
fails:The $SAFE variable warn when access
fails:The $SAFE variable warn when set
1 change: 1 addition & 0 deletions spec/tags/language/send_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:Invoking a private getter method permits self as a receiver
1 change: 1 addition & 0 deletions spec/tags/language/singleton_class_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:Defining yield in singleton class emits a deprecation warning

0 comments on commit 107863c

Please sign in to comment.