Issue #15825 has been updated by nobu (Nobuyoshi Nakada).


Probably I might think the latter case could be allowed (and forgot to separate these cases), but it doesn't seem worth complicating.

----------------------------------------
Bug #15825: Fix a case where numbered parameters should not be allowed
https://bugs.ruby-lang.org/issues/15825#change-77906

* Author: jeremyevans0 (Jeremy Evans)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-05-05 trunk 84e71e9fc1) [x86_64-openbsd]
* Backport: 2.4: DONTNEED, 2.5: DONTNEED, 2.6: DONTNEED
----------------------------------------
Because `proc{|| @1}` is a syntax error, the following should
also be syntax errors:

```ruby
proc { |  
| @1}

proc { |; a| @1 }
```

The attached patch makes both of those cases syntax errors.

---Files--------------------------------
fix-numbered-parameters-opt_bv_decl.patch (1.49 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>