Issue #4146 has been updated by matz (Yukihiro Matsumoto). Status changed from Assigned to Rejected 文法が気に入らないのでreject。 Matz. ---------------------------------------- Feature #4146: Improvement of Symbol and Proc https://bugs.ruby-lang.org/issues/4146#change-31941 Author: nobu (Nobuyoshi Nakada) Status: Rejected Priority: Normal Assignee: nobu (Nobuyoshi Nakada) Category: core Target version: =begin 現在Symbol#to_procで %w[12 45 32].map(&:to_i) のようなことはできますが、 引数を付けてメソッドを呼ぶことはできません。Symbolリテラルに引数を付け たらその引数と共にメソッドを呼ぶProcを作る構文というのはどうでしょうか。 %w[12 45 32].map(&:to_i(9)).map(&:*(2)) #=> [22, 82, 58] %w[abc def ghi].map(&:[1]) #=> ["b", "e", "h"] =end
on 2012-10-30 00:46
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.