<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 6: Module loading bug</title><link href="https://sourceforge.net/p/xchat-ruby/bugs/6/" rel="alternate"/><link href="https://sourceforge.net/p/xchat-ruby/bugs/6/feed.atom" rel="self"/><id>https://sourceforge.net/p/xchat-ruby/bugs/6/</id><updated>2007-04-23T14:50:52Z</updated><subtitle>Recent changes to 6: Module loading bug</subtitle><entry><title>Module loading bug</title><link href="https://sourceforge.net/p/xchat-ruby/bugs/6/" rel="alternate"/><published>2007-04-23T14:50:52Z</published><updated>2007-04-23T14:50:52Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.netb53b543fe7b1ef9d10ec40b15c262003f18acfef</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;/rb exec require 'gtk2'&lt;/p&gt;
&lt;p&gt;Ruby error executing hook 'rb': can't convert false into String&lt;br /&gt;
/usr/lib/ruby/site_ruby/1.8/gtk2.rb:13:in `init'&lt;br /&gt;
/usr/lib/ruby/site_ruby/1.8/gtk2.rb:13&lt;br /&gt;
(/rb exec):1:in `require'&lt;br /&gt;
(/rb exec):1:in `rb_command_exec'&lt;br /&gt;
(eval):461:in `eval'&lt;br /&gt;
(eval):519:in `rb_command_exec'&lt;br /&gt;
(eval):461:in `rb_command_hook'&lt;br /&gt;
(eval):212:in `call'&lt;br /&gt;
(eval):212:in `process_command_hook'&lt;br /&gt;
(eval):228:in `process_hook'&lt;br /&gt;
(eval):225:in `each'&lt;br /&gt;
(eval):225:in `process_hook'&lt;br /&gt;
(eval):212:in `process_command_hook'&lt;/p&gt;
&lt;p&gt;/rb exec require 'gtk2'&lt;/p&gt;
&lt;p&gt;The second time it executes cleanly and works.&lt;/p&gt;
&lt;p&gt;xchat-ruby-plugin.rb&lt;/p&gt;
&lt;p&gt;def module_load( file )&lt;br /&gt;
$LOAD_PATH.dup.unshift( "" ).each do |path|&lt;br /&gt;
f = path + ( path.length &amp;gt; 0 ? "/" : "" ) + file&lt;br /&gt;
if File.exist? f&lt;br /&gt;
File.open( f, "r" ) do |fh|&lt;br /&gt;
lines = fh.readlines.join&lt;br /&gt;
module_eval lines&lt;br /&gt;
end&lt;br /&gt;
return true&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
raise "could not load \"#{file}\""&lt;br /&gt;
end&lt;/p&gt;
&lt;p&gt;Removing either of these two lines:&lt;br /&gt;
lines = fh.readlines.join&lt;br /&gt;
module_eval lines&lt;br /&gt;
stops the error but stops the file from loading.&lt;/p&gt;
&lt;p&gt;The "false" may be coming from elsewhere as I have tried checking for lines == false&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>