summaryrefslogtreecommitdiff
path: root/lib/ostruct.rb
diff options
context:
space:
mode:
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 f083677d8e9..9106f6e068c 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