From 294a1d2270e875c11b7f92176ac954c130d69a8a Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 12 May 2008 01:52:53 +0000 Subject: [PATCH] * ruby.c (ruby_init_gems), gem_prelude.rb: check if Gem is defined instead of Gem::Enable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 ++++- gem_prelude.rb | 4 ++-- ruby.c | 4 +--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 67fa03aa46..62a099ab43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -Mon May 12 10:51:46 2008 Nobuyoshi Nakada +Mon May 12 10:52:51 2008 Nobuyoshi Nakada + + * ruby.c (ruby_init_gems), gem_prelude.rb: check if Gem is defined + instead of Gem::Enable. * gem_prelude.rb (load_full_rubygems_library, const_missing): prevent infinite recursion. [ruby-dev:34539] diff --git a/gem_prelude.rb b/gem_prelude.rb index 8be90510a2..ec9f1f4f33 100644 --- a/gem_prelude.rb +++ b/gem_prelude.rb @@ -2,9 +2,9 @@ # empty gem_prelude.rb # -# p Gem::Enable +# p defined?(Gem) -if defined?(Gem::Enable) && Gem::Enable then +if defined?(Gem) then module Kernel diff --git a/ruby.c b/ruby.c index be0af70aa5..ae9ff9479d 100644 --- a/ruby.c +++ b/ruby.c @@ -917,9 +917,7 @@ void Init_prelude(void); static void ruby_init_gems(int enable) { - VALUE gem; - gem = rb_define_module("Gem"); - rb_const_set(gem, rb_intern("Enable"), enable ? Qtrue : Qfalse); + if (enable) rb_define_module("Gem"); Init_prelude(); }