fork download
  1. c = class SomeClass
  2.  
  3. define_method(:some_method_name) {|arg|
  4. s = "Some method called on #{arg}"
  5. puts s}
  6. end
  7.  
  8. if c === 'some class'
  9. puts 'Comparison of class to string succeeded, somehow'
  10. end
Success #stdin #stdout 0.01s 7460KB
stdin
Standard input is empty
stdout
Some method called on some class