1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* object.c (rb_mod_cmp): stupid comparison fixed.

* io.c (Init_IO): ARGF.path added (alias to ARGF.filename).
  [ruby-dev:20197]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2003-05-19 06:27:06 +00:00
parent 6e52d10fe6
commit db0b2bb241
3 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,10 @@
Mon May 19 14:42:50 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* 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 <matz@ruby-lang.org>
* object.c (init_copy): rename copy_object as initialize_copy,

1
io.c
View file

@ -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);

View file

@ -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);
}