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:
parent
7350562e5e
commit
2ec4b694cb
2 changed files with 5 additions and 1 deletions
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue