summaryrefslogtreecommitdiffstats
path: root/lib/ostruct.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-02 16:45:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-02 16:45:35 +0000
commit8e011248465bae7b06203bc2c260432454bcac21 (patch)
tree6ae42a518c1c5705b8f097668d2b83413da0b6ec /lib/ostruct.rb
parent50c355b12eac3ffa982fc60e96a8a272b6b4dff9 (diff)
downloadruby-8e011248465bae7b06203bc2c260432454bcac21.tar.gz
ruby-8e011248465bae7b06203bc2c260432454bcac21.tar.xz
ruby-8e011248465bae7b06203bc2c260432454bcac21.zip
use Object#class instead of deprecated Object#type.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/ostruct.rb')
-rw-r--r--lib/ostruct.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ostruct.rb b/lib/ostruct.rb
index f083677d8..9106f6e06 100644
--- a/lib/ostruct.rb
+++ b/lib/ostruct.rb
@@ -35,14 +35,14 @@ class OpenStruct
end
def delete_field(name)
- if name.type == Fixnum
+ if name.class == Fixnum
name = name.id2name
end
@table.delete name
end
def inspect
- str = "<#{self.type}"
+ str = "<#{self.class}"
for k,v in @table
str += " "
str += k