>>>>> "D" == Daniel Berger <Daniel.Berger / qwest.com> writes: D> Foo.new.test("foo".to_sym) # NUM: 10201 - yikes! moulon% cat aa.c #include "ruby.h" #include <stdio.h> static VALUE aa_to_int(VALUE self) { return INT2FIX(12); } static VALUE aa_test(VALUE self) { printf("NUM: %ld\n", NUM2LONG(self)); return Qnil; } void Init_aa(){ VALUE cAa = rb_define_class("Aa", rb_cObject); rb_define_method(cAa, "test", aa_test, 0); rb_define_method(cAa, "to_int", aa_to_int, 0); } moulon% moulon% ruby -raa -e 'Aa.new.test' NUM: 12 moulon% Guy Decoux