Permalink
Browse files

Moved Object.meta_class to Kernel

Removed Object.meta_class?
  • Loading branch information...
1 parent e71fcfa commit 5ada89ac5b1c9395698419a325d5170cf058cb0c Paul Engel committed May 4, 2011
Showing with 14 additions and 13 deletions.
  1. +2 −0 CHANGELOG.rdoc
  2. +1 −0 lib/unextendable.rb
  3. +11 −0 lib/unextendable/kernel.rb
  4. +0 −13 lib/unextendable/object.rb
View
@@ -3,6 +3,8 @@
== Version 0.1.4 (May 4, 2011)
* Improved respond_to? override implementation (overriding respond_to? only once after extending an unextendable module)
+* Moved Object.meta_class to Kernel
+* Removed Object.meta_class?
== Version 0.1.3 (May 2, 2011)
View
@@ -1,3 +1,4 @@
require File.expand_path("../unextendable/module" , __FILE__)
+require File.expand_path("../unextendable/kernel" , __FILE__)
require File.expand_path("../unextendable/object" , __FILE__)
require File.expand_path("../unextendable/version", __FILE__)
@@ -0,0 +1,11 @@
+module Kernel
+
+ def meta_class(&block)
+ class << self
+ yield if block_given?
+ self
+ end
+ end
+ alias :singleton_class :meta_class
+
+end
@@ -1,18 +1,5 @@
class Object
- def meta_class(&block)
- class << self
- yield if block_given?
- self
- end
- end
- alias :singleton_class :meta_class
-
- def meta_class?
- !!(meta_class rescue false)
- end
- alias :singleton_class? :meta_class?
-
meta_class do
def extended_modules
@extended_modules ||= []

0 comments on commit 5ada89a

Please sign in to comment.