mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
669d43780e
commit
294a1d2270
3 changed files with 7 additions and 6 deletions
|
@ -1,4 +1,7 @@
|
||||||
Mon May 12 10:51:46 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Mon May 12 10:52:51 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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
|
* gem_prelude.rb (load_full_rubygems_library, const_missing): prevent
|
||||||
infinite recursion. [ruby-dev:34539]
|
infinite recursion. [ruby-dev:34539]
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
# empty gem_prelude.rb
|
# empty gem_prelude.rb
|
||||||
#
|
#
|
||||||
# p Gem::Enable
|
# p defined?(Gem)
|
||||||
|
|
||||||
if defined?(Gem::Enable) && Gem::Enable then
|
if defined?(Gem) then
|
||||||
|
|
||||||
module Kernel
|
module Kernel
|
||||||
|
|
||||||
|
|
4
ruby.c
4
ruby.c
|
@ -917,9 +917,7 @@ void Init_prelude(void);
|
||||||
static void
|
static void
|
||||||
ruby_init_gems(int enable)
|
ruby_init_gems(int enable)
|
||||||
{
|
{
|
||||||
VALUE gem;
|
if (enable) rb_define_module("Gem");
|
||||||
gem = rb_define_module("Gem");
|
|
||||||
rb_const_set(gem, rb_intern("Enable"), enable ? Qtrue : Qfalse);
|
|
||||||
Init_prelude();
|
Init_prelude();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue