Permalink
Browse files

Move Kernel#singleton_class definition into core_ext/kernel.rb

  • Loading branch information...
1 parent 8317a00 commit 597b2f0e1b1d00c508cf06dadffe826063ebf070 @dkubb dkubb committed Mar 13, 2011
Showing with 15 additions and 12 deletions.
  1. +1 −2 dm-core.gemspec
  2. +0 −1 lib/dm-core.rb
  3. +14 −1 lib/dm-core/core_ext/kernel.rb
  4. +0 −8 lib/dm-core/ext/singleton_class.rb
View
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
s.authors = ["Dan Kubb"]
- s.date = %q{2011-03-10}
+ s.date = %q{2011-03-12}
s.description = %q{Faster, Better, Simpler.}
s.email = %q{dan.kubb@gmail.com}
s.extra_rdoc_files = [
@@ -43,7 +43,6 @@ Gem::Specification.new do |s|
"lib/dm-core/ext/hash.rb",
"lib/dm-core/ext/module.rb",
"lib/dm-core/ext/object.rb",
- "lib/dm-core/ext/singleton_class.rb",
"lib/dm-core/ext/string.rb",
"lib/dm-core/ext/try_dup.rb",
"lib/dm-core/identity_map.rb",
View
@@ -11,7 +11,6 @@ module DataMapper
module Undefined; end
end
-require 'dm-core/ext/singleton_class'
require 'dm-core/ext/blank'
require 'dm-core/ext/hash'
@@ -1,10 +1,23 @@
module Kernel
- private
+
+ # Returns the object's singleton class.
+ #
+ # @return [Class]
+ #
+ # @api private
+ def singleton_class
+ class << self
+ self
+ end
+ end unless respond_to?(:singleton_class) # exists in 1.9.2
+
+private
# Delegates to DataMapper.repository()
#
# @api public
def repository(*args, &block)
DataMapper.repository(*args, &block)
end
+
end # module Kernel
@@ -1,8 +0,0 @@
-module Kernel
- # Returns the object's singleton class.
- def singleton_class
- class << self
- self
- end
- end unless respond_to?(:singleton_class) # exists in 1.9.2
-end

0 comments on commit 597b2f0

Please sign in to comment.