<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 6: Module loading bug</title><link>https://sourceforge.net/p/xchat-ruby/bugs/6/</link><description>Recent changes to 6: Module loading bug</description><atom:link href="https://sourceforge.net/p/xchat-ruby/bugs/6/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 23 Apr 2007 14:50:52 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/xchat-ruby/bugs/6/feed.rss" rel="self" type="application/rss+xml"/><item><title>Module loading bug</title><link>https://sourceforge.net/p/xchat-ruby/bugs/6/</link><description>&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;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 23 Apr 2007 14:50:52 -0000</pubDate><guid>https://sourceforge.netb53b543fe7b1ef9d10ec40b15c262003f18acfef</guid></item></channel></rss>