Path: | lib/backports/basic_object.rb |
Last Update: | Sun Jul 12 00:53:47 +0000 2015 |
Note: Must be required explicitely! This is a best attempt to fake BasicObject in Ruby 1.8.x What you do get:
* as few methods as the real BasicObject (at the moment the library is required...) * BasicObject === <anything> # ==> returns true
What you don‘t get:
* BasicObject is not in the ancestor list of all classes and thus * Comparisons between classes won't work, e.g. Object < BasicObject # ==> returns true instead of false * Instance methods added to Object or Kernel after you require 'backports/basic_object' might also be available in instances of BasicObject and subclasses (they will only be undefined whenever a subclass of BasicObject is created)
Because of all the fineprint, BasicObject must be required explicitely