From: dblack@... Date: 2006-10-28T21:02:01+09:00 Subject: Re: how to import variable from other .rb file? Hi -- On Sat, 28 Oct 2006, camenix wrote: > Is here anyone who can help me? > 1. eval File.read('config.rb') > > It won't work till use global varibale in > main.rb : > eval File.read('config.rb') > puts $tool_mysql > OR: > main.rb : > tool_mysql='' > eval File.read('config.rb') > puts tool_mysql If by "help" you mean change the way eval works, then no :-) Jan already showed you some ways to read things in from another file, so I'm not sure what you're asking. David -- David A. Black | dblack@wobblini.net Author of "Ruby for Rails" [1] | Ruby/Rails training & consultancy [3] DABlog (DAB's Weblog) [2] | Co-director, Ruby Central, Inc. [4] [1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com [2] http://dablog.rubypal.com | [4] http://www.rubycentral.org