From: "Darryl L. Pierce" Date: 2011-12-02T22:14:40+09:00 Subject: Native extension: arguments as a hash I'm working on a native extension in C for Ruby 1.8.7. The method I'm working on must have the signature: def receive(receiver, opts = {}) so that users can call: receiver(receiver, :timeout => 15) # :timeout is optional But I can't find a decent example of what such a method would look like in C. I've tried the following: static VALUE qpid_receiver(VALUE self, VALUE* varg) { } which works fine for receiving variable arguments. But what I'm not seeing is the arguments beyond the first being pushed into a Hash. So the question is: in a native extension, how do I tell Ruby that I want all arguments after the first to be presented as a Hash, with a default of an empty Hash if no arguments are present? Thanks. -- Darryl L. Pierce http://mcpierce.multiply.com/ "What do you care what people think, Mr. Feynman?"