mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* file.c (rb_stat_inspect): print dev, rdev in hexadecimal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3d51761abd
commit
9f0d9bd711
6 changed files with 23 additions and 10 deletions
|
@ -66,18 +66,17 @@ module Singleton
|
|||
# singletons types (sounds like an oxymoron) and
|
||||
# helps out people counting on transitive mixins
|
||||
unless mod.instance_of? (Class)
|
||||
raise TypeError.new "Inclusion of the OO-Singleton module in module #{mod}"
|
||||
raise TypeError, "Inclusion of the OO-Singleton module in module #{mod}"
|
||||
end
|
||||
unless (class << mod; self end) <= (class << Object; self end)
|
||||
raise TypeError.new "Inclusion of the OO-Singleton module in singleton type"
|
||||
raise TypeError, "Inclusion of the OO-Singleton module in singleton type"
|
||||
end
|
||||
super
|
||||
end
|
||||
def included (klass)
|
||||
# remove build in copying methods
|
||||
klass.class_eval do
|
||||
undef_method(:clone) rescue nil
|
||||
undef_method(:dup) rescue nil
|
||||
define_method(:clone) {raise TypeError, "can't clone singleton #{self.type}"}
|
||||
end
|
||||
|
||||
# initialize the ``klass instance variable'' @__instance__ to nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue