diff --git a/ChangeLog b/ChangeLog index 170c202cfc..8a718a670a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Mon May 19 14:42:50 2003 Yukihiro Matsumoto + + * object.c (rb_mod_cmp): stupid comparison fixed. + + * io.c (Init_IO): ARGF.path added (alias to ARGF.filename). + [ruby-dev:20197] + Mon May 19 13:58:03 2003 Yukihiro Matsumoto * object.c (init_copy): rename copy_object as initialize_copy, diff --git a/io.c b/io.c index 90d4afed8e..76e7c1e550 100644 --- a/io.c +++ b/io.c @@ -4036,6 +4036,7 @@ Init_IO() rb_define_singleton_method(argf, "to_s", argf_filename, 0); rb_define_singleton_method(argf, "filename", argf_filename, 0); + rb_define_singleton_method(argf, "path", argf_filename, 0); rb_define_singleton_method(argf, "file", argf_file, 0); rb_define_singleton_method(argf, "skip", argf_skip, 0); rb_define_singleton_method(argf, "close", argf_close, 0); diff --git a/object.c b/object.c index 73f01256c1..cfd9ce9a0e 100644 --- a/object.c +++ b/object.c @@ -668,11 +668,10 @@ rb_mod_cmp(mod, arg) } cmp = rb_mod_le(mod, arg); - + if (NIL_P(cmp)) return Qnil; if (cmp) { return INT2FIX(-1); } - if (NIL_P(cmp)) return Qnil; return INT2FIX(1); }