Forum: Ruby Runtime error after moving to 1.8.7

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5a601582df3b42b65a5e8353fc9305da?d=identicon&s=25 Gerardo Santana Gómez Garrido (Guest)
on 2008-12-19 18:04
(Received via mailing list)
Ruby/Informix works fine on Ruby 1.8.6, but after installing Ruby
1.8.7 and calling CursorBase#drop I get the following error message

        wrong number of arguments (0 for 1) (ArgumentError)

CursorBase#drop is declared as
[http://github.com/santana/ruby-informix/tree/maste...]

        rb_define_method(rb_cCursorBase, "drop", rb_cursorbase_drop, 0);


Thanks in advance for any help
Bec38d63650c8912b6ba9b557fb953b9?d=identicon&s=25 Roger Pack (rogerdpack)
on 2008-12-27 01:06
>
> Thanks in advance for any help
could ask core
5a601582df3b42b65a5e8353fc9305da?d=identicon&s=25 Gerardo Santana Gómez Garrido (Guest)
on 2009-01-15 16:38
(Received via mailing list)
Thanks Roger!
F889bf17449ffbf62345d2b2d316a937?d=identicon&s=25 Michal Suchanek (Guest)
on 2009-01-16 14:40
(Received via mailing list)
On 19/12/2008, Gerardo Santana Gómez Garrido <gerardo.santana@gmail.com>
wrote:
> Ruby/Informix works fine on Ruby 1.8.6, but after installing Ruby
>  1.8.7 and calling CursorBase#drop I get the following error message
>
>         wrong number of arguments (0 for 1) (ArgumentError)
>
>  CursorBase#drop is declared as
>  [http://github.com/santana/ruby-informix/tree/maste...]
>
>         rb_define_method(rb_cCursorBase, "drop", rb_cursorbase_drop, 0);
>

You did not provide enough information (such as the failing method or
the full backtrace) for diagnosing the problem.

In general it is not unusual for code that works fine on 1.8.6 to fail
on 1.8.7 or the other way around as there are several incompatible
changes between these two versions.

You are probably using a stdlib method that has changed.

Thanks

Michal
5a601582df3b42b65a5e8353fc9305da?d=identicon&s=25 Gerardo Santana Gómez Garrido (Guest)
on 2009-01-16 19:55
(Received via mailing list)
On Fri, Jan 16, 2009 at 7:38 AM, Michal Suchanek <hramrach@centrum.cz>
wrote:
>>
>
> You did not provide enough information (such as the failing method


As mentioned above, CursorBase#drop is the failing method as in it's
the one that raises the unexpected exception when it's called.
CursorBase#drop is declared as recieving no arguments but it asks for
one anyways in Ruby 1.8.7. This is not the case in Ruby 1.8.6.

I'm providing also the declaration line

http://github.com/santana/ruby-informix/tree/maste...

which says


rb_define_method(rb_cCursorBase, "drop", rb_cursorbase_drop, 0);


You see?, it's declared as receiving no arguments. It works as
advertised in Ruby 1.8.6. It doesn't in Ruby 1.8.7.



> or
> the full backtrace) for diagnosing the problem.

Let me work on that and mail you back.

>
>

Thanks Michal for your attention. Actually I'm just using the
rb_define_method function to define a method as receiving no arguments
but it's asking for one anyways.


Thanks in advance for your help.
This topic is locked and can not be replied to.