Project

General

Profile

Bug #11039 » foo.rb

実行スクリプト - kiyono (yoshimitsu kiyono), 04/07/2015 09:09 AM

 
module Foo
def self.method_missing(method, *args, ohter: nil)
p args
end
end

Foo.bar({ 'a' => 2 })
# => [{"a"=>2}]

Foo.bar({ b: 1 })
# =>
# foo.rb:2:in `method_missing': unknown keyword: a (ArgumentError)
# from foo.rb:8:in `<main>'
    (1-1/1)