Project

General

Profile

Bug #12056

kwarg is not allowed after `return`

Added by nobu (Nobuyoshi Nakada) over 3 years ago. Updated 3 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:73723]

Description

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

Also available in: Atom PDF