# Runtime error after moving to 1.8.7

**URL:** <https://www.ruby-forum.com/t/runtime-error-after-moving-to-1-8-7/156041>\
**Category:** Ruby\
**Created:** [December 19, 2008, 6:04pm UTC](https://www.ruby-forum.com/t/runtime-error-after-moving-to-1-8-7/156041 "2008-12-19T18:04:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gerardo\_SSGSSS\_mez](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c37758/32.png) [@Gerardo\_SSGSSS\_mez](https://www.ruby-forum.com/u/Gerardo_SSGSSS_mez)\
**Post date:** [December 19, 2008, 6:04pm UTC](https://www.ruby-forum.com/t/runtime-error-after-moving-to-1-8-7/156041/1 "2008-12-19T18:04:17Z")

</div>

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/master/ext/informixc.ec:3332](http://github.com/santana/ruby-informix/tree/master/ext/informixc.ec:3332)]

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

```

Thanks in advance for any help

---

<div class="post-metadata">

**Author:** ![Gerardo\_SSGSSS\_mez](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c37758/32.png) [@Gerardo\_SSGSSS\_mez](https://www.ruby-forum.com/u/Gerardo_SSGSSS_mez)\
**Post date:** [December 27, 2008, 1:06am UTC](https://www.ruby-forum.com/t/runtime-error-after-moving-to-1-8-7/156041/2 "2008-12-27T01:06:04Z")

</div>

> Thanks in advance for any help  
> could ask core

---

<div class="post-metadata">

**Author:** ![Gerardo\_SSGSSS\_mez](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c37758/32.png) [@Gerardo\_SSGSSS\_mez](https://www.ruby-forum.com/u/Gerardo_SSGSSS_mez)\
**Post date:** [January 15, 2009, 4:38pm UTC](https://www.ruby-forum.com/t/runtime-error-after-moving-to-1-8-7/156041/3 "2009-01-15T16:38:49Z")

</div>

Thanks Roger!

---

<div class="post-metadata">

**Author:** ![Gerardo\_SSGSSS\_mez](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c37758/32.png) [@Gerardo\_SSGSSS\_mez](https://www.ruby-forum.com/u/Gerardo_SSGSSS_mez)\
**Post date:** [January 16, 2009, 2:40pm UTC](https://www.ruby-forum.com/t/runtime-error-after-moving-to-1-8-7/156041/4 "2009-01-16T14:40:01Z")

</div>

On 19/12/2008, Gerardo S. GÃ³mez Garrido [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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/master/ext/informixc.ec:3332](http://github.com/santana/ruby-informix/tree/master/ext/informixc.ec:3332)]
> 
> ```
> 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

---

<div class="post-metadata">

**Author:** ![Gerardo\_SSGSSS\_mez](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/c37758/32.png) [@Gerardo\_SSGSSS\_mez](https://www.ruby-forum.com/u/Gerardo_SSGSSS_mez)\
**Post date:** [January 16, 2009, 7:55pm UTC](https://www.ruby-forum.com/t/runtime-error-after-moving-to-1-8-7/156041/5 "2009-01-16T19:55:00Z")

</div>

On Fri, Jan 16, 2009 at 7:38 AM, Michal S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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/master/ext/informixc.ec:3332](http://github.com/santana/ruby-informix/tree/master/ext/informixc.ec:3332)

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.
