From: "Gerardo Santana Gómez Garrido" Date: 2010-01-28T02:33:50+09:00 Subject: [ruby-core:27905] Re: Ruby 1.8.7, rb_define_method and ArgumentError: wrong number of arguments (0 for 1) I'm sorry. I must explain that the ArgumentError exception is raised when calling the Cursor#drop method, not when defining it. 2010/1/27 Gerardo Santana G�mez Garrido : > On Wed, Jan 27, 2010 at 11:18 AM, Eero Saynatkari > wrote: >> On 1/27/10 8:55 AM, "Gerardo Santana G�mez Garrido" >> wrote: >>> I have the following method defined in a C extension: >>> >>> � � rb_define_method(rb_cCursorBase, "drop", rb_cursorbase_drop, 0); >>> >>> >>> it works fine in Ruby 1.8.6 but raises the following error in Ruby 1.8.7: >>> >>> ArgumentError: wrong number of arguments (0 for 1) >> >> I think 1.8.7 defines both Array#drop and Enumerable#drop. >> Might it be the case that you are calling one of these by >> Accident instead? >> >> >> Eero >> -- >> Magic is insufficiently advanced technology. > > > Hi Eero, > > I'm sure I'm calling Cursor#drop, where Cursor is a class defined in > such C extension. -- Gerardo Santana