diff options
| author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-11-14 22:46:00 +0000 |
|---|---|---|
| committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-11-14 22:46:00 +0000 |
| commit | 03958af977bde7651a74d858594a90db82ab362a (patch) | |
| tree | cf0444789976ae95677087f29a08a7671a56ce95 /lib/ostruct.rb | |
| parent | 3a4597ca20ff3dbf483a84e3cf135a959d351d2c (diff) | |
| download | ruby-03958af977bde7651a74d858594a90db82ab362a.tar.gz ruby-03958af977bde7651a74d858594a90db82ab362a.tar.xz ruby-03958af977bde7651a74d858594a90db82ab362a.zip | |
* observer.rb: raise NoMethodError instead of NameError. [ruby-dev:18788]
* ostruct.rb: ditto. fix a bug in inspect which called String#+ with
Symbol. [ruby-dev:18788]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/ostruct.rb')
| -rw-r--r-- | lib/ostruct.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ostruct.rb b/lib/ostruct.rb index a5c51022d..d806c7046 100644 --- a/lib/ostruct.rb +++ b/lib/ostruct.rb @@ -30,7 +30,7 @@ class OpenStruct elsif args.length == 0 @table[mid] else - raise NameError, "undefined method `#{mname}'", caller(1) + raise NoMethodError, "undefined method `#{mname}'", caller(1) end end @@ -42,7 +42,7 @@ class OpenStruct str = "<#{self.class}" for k,v in @table str += " " - str += k + str += k.to_s str += "=" str += v.inspect end |
