From: kiyono@raw-hide•co.jp
To: ruby-dev@ruby-lang.org
Subject: [ruby-dev:48921] [Ruby trunk - Bug #11039] [Open] method_missing の *args 引数に symbol をキーにした hash だけを渡すと エラーとなる
Date: Tue, 07 Apr 2015 09:11:40 +0000 [thread overview]
Message-ID: <redmine.issue-11039.20150407091139.6dd6ea0e97933622@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-11039.20150407091139@ruby-lang.org
Issue #11039 has been reported by yoshimitsu kiyono.
----------------------------------------
Bug #11039: method_missing の *args 引数に symbol をキーにした hash だけを渡すと エラーとなる
https://bugs.ruby-lang.org/issues/11039
* Author: yoshimitsu kiyono
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin13]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
method_missing に 第3引数として キーワード引数を設定した上で、引数に symbol をキーにした Hash だけを渡すと
=> unknown keyword: a (ArgumentError)
となる。
※ 第3引数を付け足さなければエラーにならない。
引数が文字列をキーにした Hash であればエラーにならないため、キーが symbol でも Hash であるならば合わせた挙動であるべきではないでしょうか。
---Files--------------------------------
foo.rb (244 Bytes)
--
https://bugs.ruby-lang.org/
next parent reply other threads:[~2015-04-07 9:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <redmine.issue-11039.20150407091139@ruby-lang.org>
2015-04-07 9:11 ` kiyono [this message]
2019-09-02 4:27 ` [ruby-dev:50844] [Ruby master Bug#11039] method_missing の *args 引数に symbol をキーにした hash だけを渡すと エラーとなる merch-redmine
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.issue-11039.20150407091139.6dd6ea0e97933622@ruby-lang.org \
--to=ruby-dev@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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).