Ruby Warts

misfeatures and other problems
PERL| PHP| PYTHON| RUBY
What do each of the following programs do? (all answers)
(answer)
#!/usr/bin/ruby

class Book
  def open(path)
    @file = open(path)
  end
end

f = open("/dev/zero")
puts f

b = Book.new
b.open("/dev/zero")
puts b
answer
PERL| PHP| PYTHON| RUBY
Last modified: March 30, 2006 @ 5:53 MST
Copyright (C) 1996-2017 Selene Scriven