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

* gem_prelude.rb (load_full_rubygems_library, const_missing): prevent

infinite recursion.  [ruby-dev:34539]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-05-12 01:51:47 +00:00
parent 8481c848da
commit 669d43780e
3 changed files with 16 additions and 5 deletions

View file

@ -1,3 +1,8 @@
Mon May 12 10:51:46 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* gem_prelude.rb (load_full_rubygems_library, const_missing): prevent
infinite recursion. [ruby-dev:34539]
Sun May 11 23:19:39 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* enum.c (all_iter_i, any_iter_i): reduced duplicated code.

View file

@ -86,7 +86,9 @@ if defined?(Gem::Enable) && Gem::Enable then
end
end
Kernel.send :undef_method, :gem
Kernel.module_eval do
undef_method :gem if method_defined? :gem
end
$".delete File.join(Gem::ConfigMap[:libdir], 'ruby',
Gem::ConfigMap[:ruby_version], 'rubygems.rb')
@ -186,7 +188,11 @@ if defined?(Gem::Enable) && Gem::Enable then
def const_missing(constant)
QuickLoader.load_full_rubygems_library
Gem.const_get(constant)
if Gem.const_defined?(constant)
Gem.const_get(constant)
else
super
end
end
def method_missing(method, *args, &block)

View file

@ -1,7 +1,7 @@
#define RUBY_VERSION "1.9.0"
#define RUBY_RELEASE_DATE "2008-05-11"
#define RUBY_RELEASE_DATE "2008-05-12"
#define RUBY_VERSION_CODE 190
#define RUBY_RELEASE_CODE 20080511
#define RUBY_RELEASE_CODE 20080512
#define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2008
#define RUBY_RELEASE_MONTH 5
#define RUBY_RELEASE_DAY 11
#define RUBY_RELEASE_DAY 12
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];