1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/digest/lib/digest.rb (Digest::self.const_missing): avoid

infinite recursive const_missing call.  [ruby-talk:262193]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-07-28 00:44:08 +00:00
parent 6d9a4f510c
commit 0e83f22cf5
3 changed files with 12 additions and 5 deletions

View file

@ -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