[ruby-core:74088] [Ruby trunk Bug#12056] kwarg is not allowed after `return`

From: shyouhei@...
Date: 2016-03-02 03:42:12 UTC
List: ruby-core #74088
Issue #12056 has been updated by Shyouhei Urabe.


cf https://docs.google.com/document/u/2/d/1rj7ODOCSfcsQeBd6-p-NiVwqxDUg05G66LwDOkKOGTw/pub

Matz is negative to this.

----------------------------------------
Bug #12056: kwarg is not allowed after `return`
https://bugs.ruby-lang.org/issues/12056#change-57235

* Author: Nobuyoshi Nakada
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
Cited from http://aylog.tumblr.com/post/138772421042/return

```
$ ruby -e 'return foo: :bar'
-e:1: syntax error, unexpected ':', expecting end-of-input
return foo: :bar
           ^
```

Seems a bug.

https://github.com/ruby/ruby/compare/trunk...nobu:bug/return-kwargs



-- 
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>

In This Thread

Prev Next