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

* io.c (io_close): call rb_io_close() directly if io is a T_FILE

object.  [ruby-dev:27156]

* file.c (file_expand_path): allow pathnames to expand.
  [ruby-dev:27152]

* numeric.c (Init_Numeric): should define Fixnum#div.
  [ruby-dev:27129]

* file.c (rb_thread_flock): wrap flock(2) by TRAP_BEG and
  TRAP_END.  [ruby-dev:27122]

* file.c (rb_file_join): call FilePathValue() to all Pathnames to
  join.  [ruby-dev:27127]

* file.c (rb_get_path): call StringValueCStr() to ensure no nul
  bytes in path strings.

* gc.c (garbage_collect): need value for return.  [ruby-dev:27127]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2005-09-19 16:01:06 +00:00
parent 5363e91dba
commit 7559d2fd7a
6 changed files with 56 additions and 7 deletions

View file

@ -116,17 +116,22 @@ class Prime
end
class Fixnum
remove_method :/
alias / quo
alias_method :/, :quo
p :fixdiv
p [[:fixdiv, 1.div(1)]]
end
class Bignum
remove_method :/
alias / quo
end
class Rational
Unify = true
remove_method(:inspect)
remove_method :inspect
def inspect
format "%s/%s", numerator.inspect, denominator.inspect
end