<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Željko Filipin&#039;s Blog on Software and Testing &#187; Ruby</title>
	<atom:link href="http://zeljkofilipin.com/category/software/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://zeljkofilipin.com</link>
	<description>Test like you do not need the money.</description>
	<lastBuildDate>Mon, 12 Jul 2010 15:07:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.6.3" -->
	<copyright>Copyright &#xA9; 2010 Željko Filipin&#039;s Blog on Software and Testing </copyright>
	<managingEditor>zeljko.filipin@gmail.com</managingEditor>
	<webMaster>zeljko.filipin@gmail.com</webMaster>
	<category>posts</category>
	<image>
		<url>http://zeljkofilipin.com/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
		<title>Željko Filipin&#039;s Blog on Software and Testing &#187; Ruby</title>
		<link>http://zeljkofilipin.com</link>
		<width>144</width>
		<height>144</height>
	</image>
	<itunes:subtitle></itunes:subtitle>
	<itunes:summary>Test like you do not need the money.</itunes:summary>
	<itunes:keywords></itunes:keywords>
	<itunes:category text="Society &amp; Culture" />
	<itunes:author></itunes:author>
	<itunes:owner>
		<itunes:name></itunes:name>
		<itunes:email>zeljko.filipin@gmail.com</itunes:email>
	</itunes:owner>
	<itunes:block>no</itunes:block>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://zeljkofilipin.com/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<item>
		<title>Ruby Mail and benchmark.rb on CRuby, JRuby, IronRuby and RubyInstaller</title>
		<link>http://zeljkofilipin.com/2010/01/05/ruby-mail-and-benchmark-rb-on-cruby-jruby-ironruby-and-rubyinstaller/</link>
		<comments>http://zeljkofilipin.com/2010/01/05/ruby-mail-and-benchmark-rb-on-cruby-jruby-ironruby-and-rubyinstaller/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 17:15:42 +0000</pubDate>
		<dc:creator>Željko Filipin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://zeljkofilipin.com/?p=981</guid>
		<description><![CDATA[Update: Steve suggested I should try the script also with RubyInstaller, and I did it. This blog post is update of my recent Ruby Mail on CRuby, JRuby and IronRuby post. Mikel and Jimmy have commented on the post saying I did a poor job, and I would agree. I decided to do a better [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update: Steve suggested I should try the script also with <a href="http://rubyinstaller.org/">RubyInstaller</a>, and I did it.</strong></p>
<p>This blog post is update of my recent <a href="http://zeljkofilipin.com/2009/12/24/ruby-mail-on-cruby-jruby-and-ironruby/">Ruby Mail on CRuby, JRuby and IronRuby</a> post. Mikel and Jimmy have commented on the post saying I did a poor job, and I would agree. I decided to do a better job this time. Please let me know if measurements can be further improved.</p>
<p>So, I have an e-mail file called <code>1.eml</code>:</p>
<pre class="brush: plain;">
Date: Thu, 24 Dec 2009 14:37:34 Central European Standard Time
From: from@test.com
To: to@test.com
Message-ID: &lt;4b336e9e762a0_a1014263a4689d3@2003-ie7.mail&gt;
Subject: This is a test email
Mime-Version: 1.0
Content-Type: text/plain;
	charset=&quot;US-ASCII&quot;;
Content-Transfer-Encoding: 7bit

Some text for mail body
</pre>
<h2>The First Try</h2>
<p>This is the test from the first post. (RubyInstaller was not included in the first post.) It is included here so all code and numbers are at the same page, I guess it is easier to compare that way. Read the file, display subject and total time elapsed (in seconds).</p>
<pre class="brush: ruby;">
time = Time.now
require &quot;rubygems&quot;
require &quot;mail&quot;
mail = Mail.read(&quot;1.eml&quot;)
puts mail.subject.to_s
puts Time.now - time
</pre>
<p>Executed the script three times for each Ruby implementation. RubyInstaller the fastest, CRuby and JRuby were similar in speed, IronRuby was way slower.</p>
<table border="1">
<tbody>
<tr>
<th>Test Run</th>
<th>1</th>
<th>2</th>
<th>3</th>
</tr>
<tr>
<th>CRuby</th>
<td>2.594</td>
<td>2.109</td>
<td>2.11</td>
</tr>
<tr>
<th>JRuby</th>
<td>3.0</td>
<td>2.016</td>
<td>2.0</td>
</tr>
<tr>
<th>IronRuby</th>
<td>9.8125</td>
<td>7.796875</td>
<td>7.6875</td>
</tr>
<tr>
<th>RubyInstaller</th>
<td>1.21875</td>
<td>1.203125</td>
<td>1.203125</td>
</tr>
</tbody>
</table>
<table>
<h2>The Second Try</h2>
<p>Since both Mikel and Jimmy said <code>require</code> could take the majority of the time, and I was not really interested in measuring that, I excluded it from the measurement. </p>
<pre class="brush: ruby;">
require &quot;rubygems&quot;
require &quot;mail&quot;

time = Time.now
mail = Mail.read(&quot;1.eml&quot;)
puts mail.subject.to_s
puts Time.now - time
</pre>
<p>Times were way shorter. RubyInstaller the fastest (can not get much faster that 0.0 seconds), CRuby and JRuby in the same order of magnitude, IronRuby order of magnitude slower. JRuby has surprisingly the same numbers every time.</p>
<table border="1">
<tbody>
<tr>
<th>Test Run</th>
<th>1</th>
<th>2</th>
<th>3</th>
</tr>
<tr>
<th>CRuby</th>
<td>0.015</td>
<td>0.016</td>
<td>0.0</td>
</tr>
<tr>
<th>JRuby</th>
<td>0.047</td>
<td>0.047</td>
<td>0.047</td>
</tr>
<tr>
<th>IronRuby</th>
<td>0.5</td>
<td>0.46875</td>
<td>0.484375</td>
</tr>
<tr>
<th>RubyInstaller</th>
<td>0.0</td>
<td>0.0</td>
<td>0.0</td>
</tr>
</tbody>
</table>
<table>
<h2>Benchmark</h2>
<p>Mikel and Jimmy have suggested that I should use <a href="http://ruby-doc.org/stdlib/libdoc/benchmark/rdoc/index.html">benchmark.rb</a>, so I took a look. I have slightly modified the script. This time the file was read 1000 times.</p>
<pre class="brush: ruby;">
require &quot;rubygems&quot;
require &quot;mail&quot;
require &quot;benchmark&quot;

Benchmark.bm do |x|
  x.report { 1000.times do; puts Mail.read(&quot;1.eml&quot;).subject.to_s; end }
end
</pre>
<p>This measurement said JRuby was the fastest, followed closely by RubyInstaller and CRuby, IronRuby again order of magnitude slower.</p>
<table border="1">
<tbody>
<tr>
<th>Test Run</th>
<th>user</th>
<th>system</th>
<th>total</th>
<th>real</th>
</tr>
<tr>
<th>CRuby</th>
<td>11.000000</td>
<td>0.657000</td>
<td>11.657000</td>
<td>13.485000</td>
</tr>
<tr>
<th>JRuby</th>
<td>6.187000</td>
<td>0.000000</td>
<td>6.187000</td>
<td>6.187000</td>
</tr>
<tr>
<th>IronRuby</th>
<td>69.984375</td>
<td>7.140625</td>
<td>77.125000</td>
<td>60.656250</td>
</tr>
<tr>
<th>RubyInstaller</th>
<td>7.297000</td>
<td>0.766000</td>
<td>8.063000</td>
<td>9.953125</td>
</tr>
</tbody>
</table>
<h2>Environment</h2>
<p>Tests were run in VMware Fusion 2.0.6 virtual machine, 512 MB RAM, Microsoft Windows Sever 2003 R2 (Standard Edition, Service pack 2).<br />
Host machine is MacBook Pro, 2.4 GHz Intel Core 2 Duo, Mac OS X 10.6.2, 4 GB RAM.</p>
<pre class="brush: bash;">
&gt;ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

&gt;jruby -v
jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java HotSpot(TM) Client VM 1.6.0_10) [x86-java]

&gt;ir -v
IronRuby 0.9.3.0 on .NET 2.0.0.0

&gt;ruby -v
ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]
</pre>
<p>Mail version 1.3.4 on all platforms.</p>
]]></content:encoded>
			<wfw:commentRss>http://zeljkofilipin.com/2010/01/05/ruby-mail-and-benchmark-rb-on-cruby-jruby-ironruby-and-rubyinstaller/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ruby Mail on CRuby, JRuby and IronRuby</title>
		<link>http://zeljkofilipin.com/2009/12/24/ruby-mail-on-cruby-jruby-and-ironruby/</link>
		<comments>http://zeljkofilipin.com/2009/12/24/ruby-mail-on-cruby-jruby-and-ironruby/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 15:01:41 +0000</pubDate>
		<dc:creator>Željko Filipin</dc:creator>
				<category><![CDATA[E-mail]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://zeljkofilipin.com/?p=887</guid>
		<description><![CDATA[Today I tried Mikel Lindsaar&#8217;s Mail gem on CRuby, JRuby and IronRuby. Installation of each Ruby version and Mail gem was really easy so I will not describe it here. What interested me was how fast was Mail on each Ruby implementation. I have created a simple mail and saved it as 1.eml. Date: Thu, [...]]]></description>
			<content:encoded><![CDATA[<p>Today I tried Mikel Lindsaar&#8217;s <a href="http://github.com/mikel/mail">Mail</a> gem on <a href="http://www.ruby-lang.org/en/">CRuby</a>, <a href="http://jruby.org/">JRuby</a> and <a href="http://www.ironruby.net/">IronRuby</a>.</p>
<p>Installation of each Ruby version and Mail gem was really easy so I will not describe it here. What interested me was how fast was Mail on each Ruby implementation.</p>
<p>I have created a simple mail and saved it as <code>1.eml</code>.</p>
<pre class="brush: plain;">
Date: Thu, 24 Dec 2009 14:37:34 Central European Standard Time
From: from@test.com
To: to@test.com
Message-ID: &lt;4b336e9e762a0_a1014263a4689d3@2003-ie7.mail&gt;
Subject: This is a test email
Mime-Version: 1.0
Content-Type: text/plain;
	charset=&quot;US-ASCII&quot;;
Content-Transfer-Encoding: 7bit

Some text for mail body
</pre>
<p>This script will read the file, display subject and time elapsed (in seconds).</p>
<pre class="brush: ruby;">
time = Time.now
require &quot;rubygems&quot;
require &quot;mail&quot;
mail = Mail.read(&quot;1.eml&quot;)
puts mail.subject.to_s
puts Time.now - time
</pre>
<p>I have executed the script three times for each Ruby implementation. It looks to me that CRuby and JRuby are similar in speed, and IronRuby is way slower.</p>
<table border="1">
<tbody>
<tr>
<th>Test Run</th>
<th>CRuby</th>
<th>JRuby</th>
<th>IronRuby</th>
</tr>
<tr>
<td>1</td>
<td>2.594</td>
<td>3.0</td>
<td>9.8125</td>
</tr>
<tr>
<td>2</td>
<td>2.109</td>
<td>2.016</td>
<td>7.796875</td>
</tr>
<tr>
<td>3</td>
<td>2.11</td>
<td>2.0</td>
<td>7.6875</td>
</tr>
</tbody>
</table>
<table>
<h2>Environment</h2>
<p>Tests were run in VMware Fusion 2.0.6 virtual machine, 512 MB RAM, Microsoft Windows Sever 2003 R2 (Standard Edition, Service pack 2).<br />
Host machine is MacBook Pro, 2.4 GHz Intel Core 2 Duo, Mac OS X 10.6.2, 4 GB RAM.</p>
<pre class="brush: bash;">
&gt;ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

&gt;jruby -v
jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java HotSpot(TM) Client VM 1.6.0_10) [x86-java]

&gt;ir -v
IronRuby 0.9.3.0 on .NET 2.0.0.0
</pre>
<p>Mail version 1.3.4 on all platforms.</table>
]]></content:encoded>
			<wfw:commentRss>http://zeljkofilipin.com/2009/12/24/ruby-mail-on-cruby-jruby-and-ironruby/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ruby on Beers 2</title>
		<link>http://zeljkofilipin.com/2008/05/12/ruby-on-beers-2/</link>
		<comments>http://zeljkofilipin.com/2008/05/12/ruby-on-beers-2/#comments</comments>
		<pubDate>Mon, 12 May 2008 11:01:16 +0000</pubDate>
		<dc:creator>Željko Filipin</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://zeljkofilipin.com/?p=337</guid>
		<description><![CDATA[Ruby on Beers 2 The second Ruby on Beers happened yesterday. About 15 of us appeared, much more than I expected. We were talking about Heroku, Git and Watir. We did not have the time to talk about Unicode and RSpec, so we will talk about it the next time. There was interest in talking [...]]]></description>
			<content:encoded><![CDATA[<table style="width:194px;">
<tr>
<td align="center" style="height:194px;background:url(http://picasaweb.google.com/f/img/transparent_album_background.gif) no-repeat left"><a href="http://picasaweb.google.com/zeljko.filipin/RubyOnBeers2"><img src="http://lh4.ggpht.com/zeljko.filipin/SCf8TctoVEE/AAAAAAAAByE/b6EWjTHwPvg/s160-c/RubyOnBeers2.jpg" width="160" height="160" style="margin:1px 0 0 4px;"></a></td>
</tr>
<tr>
<td style="text-align:center;font-family:arial,sans-serif;font-size:11px"><a href="http://picasaweb.google.com/zeljko.filipin/RubyOnBeers2" style="color:#4D4D4D;font-weight:bold;text-decoration:none;">Ruby on Beers 2</a></td>
</tr>
</table>
<p>The second <a href="http://groups.google.com/group/ruby-hr/web/ruby-on-beers">Ruby on Beers</a> happened yesterday. About 15 of us appeared, much more than I expected.</p>
<p>We were talking about <a href="http://heroku.com/">Heroku</a>, <a href="http://git.or.cz/">Git</a> and <a href="http://wtr.rubyforge.org/">Watir</a>.</p>
<p>We did not have the time to talk about <a href="http://unicode.org/">Unicode</a> and <a href="http://rspec.info/">RSpec</a>, so we will talk about it the next time. There was interest in talking about <a href="http://rubini.us/">Rubinius</a>.</p>
<p>The next Ruby on Beers will probably happen at the same place (Multimedijalni institut, net.kulturni klub mama, Preradovićeva 18, Zagreb), at Saturday May 31st 2008 at 5 pm.</p>
]]></content:encoded>
			<wfw:commentRss>http://zeljkofilipin.com/2008/05/12/ruby-on-beers-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Beers</title>
		<link>http://zeljkofilipin.com/2008/04/07/ruby-on-beers/</link>
		<comments>http://zeljkofilipin.com/2008/04/07/ruby-on-beers/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 12:08:29 +0000</pubDate>
		<dc:creator>Željko Filipin</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://zeljkofilipin.com/?p=328</guid>
		<description><![CDATA[Ruby on Beers 1 The first Ruby on Beers meeting happened last Saturday, April 5th, 2008 at lake Jarun, Zagreb, Croatia (map). Ruby on Beers is informal gathering of Ruby users. It all started at ruby-hr Google group (in Croatian) that came to life after the first BarCamp Zagreb where we realized that there are [...]]]></description>
			<content:encoded><![CDATA[<table style="width:194px;">
<tr>
<td align="center" style="height:194px;background:url(http://picasaweb.google.com/f/img/transparent_album_background.gif) no-repeat left"><a href="http://picasaweb.google.com/zeljko.filipin/RubyOnBeers1"><img src="http://lh5.ggpht.com/zeljko.filipin/R_np55q1uiE/AAAAAAAABgg/9mV4DcKEiSc/s160-c/RubyOnBeers1.jpg" width="160" height="160" style="margin:1px 0 0 4px;"></a></td>
</tr>
<tr>
<td style="text-align:center;font-family:arial,sans-serif;font-size:11px"><a href="http://picasaweb.google.com/zeljko.filipin/RubyOnBeers1" style="color:#4D4D4D;font-weight:bold;text-decoration:none;">Ruby on Beers 1</a></td>
</tr>
</table>
<p>The first Ruby on Beers meeting happened last Saturday, April 5th, 2008 at lake Jarun, Zagreb, Croatia (<a href="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;ll=45.785362,15.917569&amp;spn=0.005417,0.009956&amp;z=17&amp;msid=100534457194060349521.000449f7238684e0bb617">map</a>).</p>
<p>Ruby on Beers is informal gathering of Ruby users. <a href="http://groups.google.com/group/ruby-hr/browse_thread/thread/dde9f2c93c17fd3e">It all started at</a> <a href="http://groups.google.com/group/ruby-hr/">ruby-hr</a> Google group (in Croatian) that came to life after the first <a href="http://barcamp.ini.hr/">BarCamp Zagreb</a> where we realized that there are more than one Ruby user in the near (as I thought before Barcamp).</p>
<p>The four of us appeared. <a href="http://bsloser.emusoft.org/">Branimir Šloser</a>, <a href="http://www.linkedin.com/in/sbrankovic">Saša Branković</a>, <a href="http://mislav.caboo.se/">Mislav Marohnić</a> and me.</p>
<p>We enjoyed excellent Tomislav beer and discussed <a href="http://en.wikipedia.org/wiki/The_Answer_to_Life,_the_Universe,_and_Everything">the meaning of life, the universe, and everything</a>, and more specifically, what to do next.</p>
<p>The next meeting should be on Saturday, May 10th, 2008. I hope I will be able to talk about <a href="http://wtr.rubyforge.org/">Watir</a>, and there are rumors that there will be something said about <a href="http://git.or.cz/">Git</a> and <a href="http://unicode.org/">Unicode</a>. Only the time will tell.</p>
<p>More details at <a href="http://groups.google.com/group/ruby-hr/web/ruby-on-beers">Ruby on Beers official page</a>.</p>
<p>If you are in the near, please drop by.</p>
]]></content:encoded>
			<wfw:commentRss>http://zeljkofilipin.com/2008/04/07/ruby-on-beers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TMail 1.1.0 Gem Released</title>
		<link>http://zeljkofilipin.com/2007/10/31/tmail-110-gem-released/</link>
		<comments>http://zeljkofilipin.com/2007/10/31/tmail-110-gem-released/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 07:00:53 +0000</pubDate>
		<dc:creator>Željko Filipin</dc:creator>
				<category><![CDATA[E-mail]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://zeljkofilipin.com/2007/10/31/tmail-110-gem-released/</guid>
		<description><![CDATA[I have been using TMail for testing e-mail functionality of web application that I test for a long time. But, development of that library stopped at 2004. Today I found out that it is again in development. Take a look at it&#8217;s web site and RubyForge project site.]]></description>
			<content:encoded><![CDATA[<p><a href='http://tmail.rubyforge.org/' title='stamp-sm.jpg'><img src='/wp-content/uploads/2007/10/stamp-sm.jpg' alt='stamp-sm.jpg' /></a></p>
<p>I have been using TMail for testing e-mail functionality of web application that I test <a href="http://zeljkofilipin.com/2006/10/12/test-if-application-sends-correct-e-mails/">for a long time</a>. But, development of that library stopped at 2004. Today I found out that it is again in development. Take a look at it&#8217;s <a href="http://tmail.rubyforge.org/">web site</a> and <a href="http://rubyforge.org/projects/tmail/">RubyForge project site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://zeljkofilipin.com/2007/10/31/tmail-110-gem-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Everyday Scripting with Ruby Arrived</title>
		<link>http://zeljkofilipin.com/2007/10/30/everyday-scripting-with-ruby-arrived/</link>
		<comments>http://zeljkofilipin.com/2007/10/30/everyday-scripting-with-ruby-arrived/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 09:27:53 +0000</pubDate>
		<dc:creator>Željko Filipin</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://zeljkofilipin.com/2007/10/30/everyday-scripting-with-ruby-arrived/</guid>
		<description><![CDATA[Long long time ago, I was reviewer of Brian Marick&#8217;s Everyday Scripting with Ruby. On February 2, 2007 Pragmatic Programmers said they would send me a free copy, but it did not arrive for a long time. I exchanged a few e-mails with them, and today the book arrived. I did not even have time [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://zeljkofilipin.com/wp-content/uploads/2007/10/pa300022.JPG" title='pa300022.JPG'><img src='/wp-content/uploads/2007/10/pa300022.thumbnail.JPG' alt='pa300022.JPG' /></a></p>
<p>Long long time ago, I was reviewer of <a href="http://www.testing.com/">Brian Marick&#8217;s</a> <a href="http://www.pragprog.com/titles/bmsft/">Everyday Scripting with Ruby</a>. On February 2, 2007 Pragmatic Programmers said they would send me a free copy, but it <a href="http://zeljkofilipin.com/2007/04/12/everyday-scripting-with-ruby-for-teams-testers-and-you-by-brian-marick/">did not arrive</a> for a long time. I exchanged a few e-mails with them, and today the book arrived. I did not even have time to unwrap it yet. <img src='http://zeljkofilipin.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://zeljkofilipin.com/2007/10/30/everyday-scripting-with-ruby-arrived/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>warning: toplevel constant File referenced by IO::File</title>
		<link>http://zeljkofilipin.com/2007/10/25/warning-toplevel-constant-file-referenced-by-iofile/</link>
		<comments>http://zeljkofilipin.com/2007/10/25/warning-toplevel-constant-file-referenced-by-iofile/#comments</comments>
		<pubDate>Thu, 25 Oct 2007 13:27:44 +0000</pubDate>
		<dc:creator>Željko Filipin</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://zeljkofilipin.com/2007/10/25/warning-toplevel-constant-file-referenced-by-iofile/</guid>
		<description><![CDATA[I want to delete a file from Application::Mail.download. The problem is that inside Application module, File.delete calls Application::File.delete. module Application class File def delete end end class Mail def self.download File.delete &#8220;mail.eml&#8221; end end end Application::Mail.download Run this code and you will get error message: Exception: undefined method `delete' for Application::File:Class I could rename Application::File [...]]]></description>
			<content:encoded><![CDATA[<p>I want to delete a file from <em>Application::Mail.download</em>. The problem is that inside <em>Application</em> module, <em>File.delete</em> calls <em>Application::File.delete</em>.</p>
<p>module Application<br />
  class File<br />
    def delete<br />
    end<br />
  end<br />
  class Mail<br />
    def self.download<br />
      File.delete &#8220;mail.eml&#8221;<br />
    end<br />
  end<br />
end</p>
<p>Application::Mail.download</p>
<p>Run this code and you will get error message:</p>
<p><code>Exception: undefined method `delete' for Application::File:Class</code></p>
<p>I could rename <em>Application::File</em> to something else, but I created <em>Application</em> module because I wanted to name my classes as I wish without conflicts with Ruby classes.</p>
<p>One solution is to specify that I want to call <em>IO::File.delete</em>.</p>
<p>def self.download<br />
  IO::File.delete &#8220;mail.eml&#8221;<br />
end</p>
<p>But then I get this warning:</p>
<p><code>warning: toplevel constant File referenced by IO::File</code></p>
<p><a href="http://www.ruby-forum.com/topic/127608">How to ignore warning</a> thread at <a href="http://www.ruby-forum.com/">ruby-forum.com</a> provided the solution to removing warning. Add this at the beginning of the file:</p>
<p>$VERBOSE = nil</p>
<p>But, I want to see other warnings. I know I can change the value of <em>$VERBOSE</em> to <em>nil</em> just before I call <em>IO::File.delete</em> and then change it back. That just feels wrong. Why am I getting that warning after all? Why do I get the warning after calling <em>IO::File.delete</em>? Am I doing something wrong?</p>
]]></content:encoded>
			<wfw:commentRss>http://zeljkofilipin.com/2007/10/25/warning-toplevel-constant-file-referenced-by-iofile/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How Do I Get REXML Version Number?</title>
		<link>http://zeljkofilipin.com/2007/10/18/how-do-i-get-rexml-version-number/</link>
		<comments>http://zeljkofilipin.com/2007/10/18/how-do-i-get-rexml-version-number/#comments</comments>
		<pubDate>Thu, 18 Oct 2007 07:00:19 +0000</pubDate>
		<dc:creator>Željko Filipin</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://zeljkofilipin.com/2007/10/18/how-do-i-get-rexml-version-number/</guid>
		<description><![CDATA[require &#34;rexml/document&#34; # =&#62; true REXML::Version # =&#62; &#34;3.1.7&#34;]]></description>
			<content:encoded><![CDATA[<pre class="brush: ruby;">
require &quot;rexml/document&quot; # =&gt; true
REXML::Version # =&gt; &quot;3.1.7&quot;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://zeljkofilipin.com/2007/10/18/how-do-i-get-rexml-version-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails Commercials</title>
		<link>http://zeljkofilipin.com/2007/10/06/ruby-on-rails-commercials/</link>
		<comments>http://zeljkofilipin.com/2007/10/06/ruby-on-rails-commercials/#comments</comments>
		<pubDate>Sat, 06 Oct 2007 07:00:27 +0000</pubDate>
		<dc:creator>Željko Filipin</dc:creator>
				<category><![CDATA[Humour]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://zeljkofilipin.com/2007/10/06/ruby-on-rails-commercials/</guid>
		<description><![CDATA[I do not use Rails a lot but commercials that Rails Envy made are great! Here is the latest one.]]></description>
			<content:encoded><![CDATA[<p>I do not use <a href="http://www.rubyonrails.org/">Rails</a> a lot but <a href="http://www.railsenvy.com/tags/Commercials">commercials</a> that <a href="http://www.railsenvy.com/">Rails Envy</a> made are great! <img src='http://zeljkofilipin.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here is the latest one.</p>
<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/kU-4D51FY98"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/kU-4D51FY98" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://zeljkofilipin.com/2007/10/06/ruby-on-rails-commercials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NoMethodError: undefined method `copy&#8217; for File:Class</title>
		<link>http://zeljkofilipin.com/2007/09/12/nomethoderror-undefined-method-copy-for-fileclass/</link>
		<comments>http://zeljkofilipin.com/2007/09/12/nomethoderror-undefined-method-copy-for-fileclass/#comments</comments>
		<pubDate>Wed, 12 Sep 2007 07:00:52 +0000</pubDate>
		<dc:creator>Željko Filipin</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://zeljkofilipin.com/2007/09/12/nomethoderror-undefined-method-copy-for-fileclass/</guid>
		<description><![CDATA[I wanted to copy a file from Ruby. Documentation for File#copy said that File.copy(from, to) should work. But, I got this error message: NoMethodError: undefined method `copy' for File:Class Google search led me to ruby-talk post that said I should do: require &#8220;ftools&#8221; I am just surprised that documentation did not make that clear.]]></description>
			<content:encoded><![CDATA[<p>I wanted to copy a file from Ruby. Documentation for <a href="http://www.ruby-doc.org/core/classes/File.html#M002607">File#copy<br />
</a> said that </p>
<p>File.copy(from, to)</p>
<p>should work. But, I got this error message:</p>
<p><code>NoMethodError: undefined method `copy' for File:Class</code></p>
<p>Google search led me to <a href="http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/131302">ruby-talk post</a> that said I should do:</p>
<p>require &#8220;ftools&#8221;</p>
<p>I am just surprised that documentation did not make that clear.</p>
]]></content:encoded>
			<wfw:commentRss>http://zeljkofilipin.com/2007/09/12/nomethoderror-undefined-method-copy-for-fileclass/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
