ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: nobu@ruby-lang.org
To: ruby-core@ruby-lang.org
Subject: [ruby-core:92546] [Ruby trunk Bug#15825] Fix a case where numbered parameters should not be allowed
Date: Sun, 05 May 2019 05:48:27 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-77906.20190505054826.bba29ed3f536f4e5@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-15825.20190505044003@ruby-lang.org

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/

      parent reply	other threads:[~2019-05-05  5:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-15825.20190505044003@ruby-lang.org>
2019-05-05  4:40 ` [ruby-core:92543] [Ruby trunk Bug#15825] Fix a case where numbered parameters should not be allowed merch-redmine
2019-05-05  5:48 ` nobu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-77906.20190505054826.bba29ed3f536f4e5@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).