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

* tool/compile_prelude.rb (Prelude#initialize): ignore empty

preludes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-01-15 01:00:09 +00:00
parent 7350562e5e
commit 2ec4b694cb
2 changed files with 5 additions and 1 deletions

View file

@ -1,4 +1,7 @@
Sat Jan 15 09:48:14 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
Sat Jan 15 10:00:07 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* tool/compile_prelude.rb (Prelude#initialize): ignore empty
preludes.
* ruby.c (ruby_init_prelude): get rid of global namespace
pullution.

View file

@ -36,6 +36,7 @@ class Prelude
@need_ruby_prefix = false
@preludes = {}
@mains = preludes.map {|filename| translate(filename)[0]}
@preludes.delete_if {|_, (_, _, lines, sub)| !sub && lines.empty?}
end
def translate(filename, sub = false)