psyho / bogus

Fake library for Ruby
Other
359 stars 14 forks source link

Support ruby 2.1 required keywords syntax #53

Closed indrekj closed 10 years ago

indrekj commented 10 years ago
def record(type:, **input)
end

raises

     RuntimeError:
       unknown argument type: keyreq
indrekj commented 10 years ago

Added a pull request to this issue. Seems to work. Basically it uses key when keyreq is given.

indrekj commented 10 years ago

This behaviour isn't correct actually. I'll see if I can fix it.

Goltergaul commented 10 years ago

+1 i would need this

psyho commented 10 years ago

Thanks for the pull request:) I've only fixed the implementation, so that it does not treat required keyword arguments the same as the optional ones.