summaryrefslogtreecommitdiffstats
path: root/ext/digest/lib
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-28 00:44:08 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-28 00:44:08 +0000
commite2b0268f54409bc0ddd75bcfbd263ab7fa32e01e (patch)
treee878457ebb704b3a80f1386a9bb5e753cfadb941 /ext/digest/lib
parentc135fd1fba81fc7a080236d636ec6fc1084c4161 (diff)
downloadruby-e2b0268f54409bc0ddd75bcfbd263ab7fa32e01e.tar.gz
ruby-e2b0268f54409bc0ddd75bcfbd263ab7fa32e01e.tar.xz
ruby-e2b0268f54409bc0ddd75bcfbd263ab7fa32e01e.zip
* ext/digest/lib/digest.rb (Digest::self.const_missing): avoid
infinite recursive const_missing call. [ruby-talk:262193] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest/lib')
-rw-r--r--ext/digest/lib/digest.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/digest/lib/digest.rb b/ext/digest/lib/digest.rb
index 244cd436b..0c4ee3c2c 100644
--- a/ext/digest/lib/digest.rb
+++ b/ext/digest/lib/digest.rb
@@ -12,9 +12,11 @@ module Digest
begin
require lib
rescue LoadError => e
- raise LoadError, "library not found for class Digest::#{name} -- #{lib}"
+ raise LoadError, "library not found for class Digest::#{name} -- #{lib}", caller(1)
+ end
+ unless Digest.const_defined?(name)
+ raise NameError, "uninitialized constant Digest::#{name}", caller(1)
end
-
Digest.const_get(name)
end