summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-22 02:46:51 (GMT)
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-22 02:46:51 (GMT)
commitc64c48ff32ae3e170d77d8eb37ad3f1788e3b440 (patch)
tree75b39104173e4c76eacdee893ab21c0aba6d9be7
parent913747d1faeafdd0870b059e4f942b0cc4c1e33d (diff)
* 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/branches/ruby_1_8_6@13206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ext/digest/lib/digest.rb6
-rw-r--r--version.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/ext/digest/lib/digest.rb b/ext/digest/lib/digest.rb
index 244cd43..0c4ee3c 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
diff --git a/version.h b/version.h
index 0cdfbcd..f5766ae 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2007-08-22"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20070822
-#define RUBY_PATCHLEVEL 79
+#define RUBY_PATCHLEVEL 80
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8