* ruby.c (ruby_init_prelude): get rid of global namespace
pullution. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fea355647e
commit
7350562e5e
@ -1,3 +1,8 @@
|
||||
Sat Jan 15 09:48:14 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ruby.c (ruby_init_prelude): get rid of global namespace
|
||||
pullution.
|
||||
|
||||
Sat Jan 15 09:42:12 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* include/ruby/io.h: missing prototypes.
|
||||
|
@ -1 +1 @@
|
||||
require 'rubygems' unless $disable_rubygems
|
||||
require 'rubygems.rb' if defined?(Gem)
|
||||
|
8
ruby.c
8
ruby.c
@ -1103,9 +1103,8 @@ proc_options(long argc, char **argv, struct cmdline_options *opt, int envopt)
|
||||
void Init_prelude(void);
|
||||
|
||||
static void
|
||||
ruby_init_prelude(int enable_gems)
|
||||
ruby_init_prelude(void)
|
||||
{
|
||||
rb_gv_set("$disable_rubygems", enable_gems ? Qfalse : Qtrue);
|
||||
Init_prelude();
|
||||
rb_const_remove(rb_cObject, rb_intern_const("TMP_RUBY_PREFIX"));
|
||||
}
|
||||
@ -1365,7 +1364,10 @@ process_options(int argc, char **argv, struct cmdline_options *opt)
|
||||
rb_enc_associate(RARRAY_PTR(load_path)[i], lenc);
|
||||
}
|
||||
}
|
||||
ruby_init_prelude(!(opt->disable & DISABLE_BIT(gems)));
|
||||
if (!(opt->disable & DISABLE_BIT(gems))) {
|
||||
rb_define_module("Gem");
|
||||
}
|
||||
ruby_init_prelude();
|
||||
ruby_set_argv(argc, argv);
|
||||
process_sflag(&opt->sflag);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user