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:
parent
6d9a4f510c
commit
0e83f22cf5
3 changed files with 12 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue