<?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/"
	>

<channel>
	<title>SameShirtEveryDay.com &#187; Ruby</title>
	<atom:link href="http://sameshirteveryday.com/category/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://sameshirteveryday.com</link>
	<description>Personal blog of the one called Alex Gorbatchev, from Toronto, Canada.</description>
	<lastBuildDate>Wed, 30 Dec 2009 20:00:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HAML bug with :javascript filter and undefined local variable or method</title>
		<link>http://sameshirteveryday.com/2009/04/19/haml-bug-with-javascript-filter-and-undefined-local-variable-or-method/</link>
		<comments>http://sameshirteveryday.com/2009/04/19/haml-bug-with-javascript-filter-and-undefined-local-variable-or-method/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 19:05:51 +0000</pubDate>
		<dc:creator>Alex Gorbatchev</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[haml]]></category>

		<guid isPermaLink="false">http://sameshirteveryday.com/?p=204</guid>
		<description><![CDATA[http://github.com/nex3/haml/issues#issue/2
on haml 2.0.9
require 'haml/engine'

template_broken = '
:javascript
  - [1, 2, 3, 4].each do &#124;item&#124;
    = "Hey #{item}"
'

puts Haml::Engine.new(template_broken).to_html
causes
(haml):3:in `to_html': undefined local variable or method `item' for #&#60;Object:0x2bedf64&#62; (NameError)
        from c:/ruby/lib/ruby/gems/1.8/gems/haml-2.0.9/lib/haml/engine.rb:149:in `to_html'
        from c:/ruby/lib/ruby/gems/1.8/gems/haml-2.0.9/lib/haml/engine.rb:149:in `instance_eval'
     [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://github.com/nex3/haml/issues#issue/2">http://github.com/nex3/haml/issues#issue/2</a></p>
<p>on haml 2.0.9</p>
<pre>require 'haml/engine'

template_broken = '
:javascript
  - [1, 2, 3, 4].each do |item|
    = "Hey #{item}"
'

puts Haml::Engine.new(template_broken).to_html</pre>
<p>causes</p>
<pre>(haml):3:in `to_html': undefined local variable or method `item' for #&lt;Object:0x2bedf64&gt; (NameError)
        from c:/ruby/lib/ruby/gems/1.8/gems/haml-2.0.9/lib/haml/engine.rb:149:in `to_html'
        from c:/ruby/lib/ruby/gems/1.8/gems/haml-2.0.9/lib/haml/engine.rb:149:in `instance_eval'
        from c:/ruby/lib/ruby/gems/1.8/gems/haml-2.0.9/lib/haml/engine.rb:149:in `to_html'
        from haml.rb:9</pre>
<p>Replacing <code>:javascript</code> filter with regular <code>%script</code> tag fixed the issue. It&#8217;s a workaround.</p>
<pre>require 'haml/engine'

template_broken = '
%script
  - [1, 2, 3, 4].each do |item|
    = "Hey #{item}"
'

puts Haml::Engine.new(template_broken).to_html</pre>
]]></content:encoded>
			<wfw:commentRss>http://sameshirteveryday.com/2009/04/19/haml-bug-with-javascript-filter-and-undefined-local-variable-or-method/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>False positives in rcov</title>
		<link>http://sameshirteveryday.com/2009/04/18/false-positives-in-rcov/</link>
		<comments>http://sameshirteveryday.com/2009/04/18/false-positives-in-rcov/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 19:05:14 +0000</pubDate>
		<dc:creator>Alex Gorbatchev</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[blocks]]></category>
		<category><![CDATA[coverage]]></category>
		<category><![CDATA[rcov]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://sameshirteveryday.com/?p=194</guid>
		<description><![CDATA[
I noticed that depending on the syntax used, rcov (0.8.1.2.0 win32) can give false positives. For example, when putting blocks on the same line as methods that execute them, if the method was called and block wasn&#8217;t, the line would still be colored as &#8220;covered&#8221;.
In the image above you can see that line #23 isn&#8217;t covered, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-195" title="rcov_false_positives" src="http://sameshirteveryday.com/wp-content/uploads/2009/04/rcov_false_positives.png" alt="rcov_false_positives" width="800" height="195" /></p>
<p>I noticed that depending on the syntax used, rcov (0.8.1.2.0 win32) can give <strong>false positives</strong>. For example, when putting blocks on the same line as methods that execute them, if the method was called and block wasn&#8217;t, the line would still be colored as &#8220;covered&#8221;.</p>
<p>In the image above you can see that line #23 isn&#8217;t covered, where as #28 is. Problem is, I don&#8217;t have any tests yet hitting XML portion.</p>
<p>What&#8217;s even more interesting is that using { } syntax on multiple lines gives false positives just the same &#8211; you have to use do/end syntax specifically. Only, and only then rcov will process the block correctly.</p>
<p>Something to keep in mind.</p>
<p><strong>Update</strong>: I have tested this on OSX and the issue is exactly the same.</p>
]]></content:encoded>
			<wfw:commentRss>http://sameshirteveryday.com/2009/04/18/false-positives-in-rcov/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Missing &#8216;a&#8217; character on Windows with rspec and cucumber</title>
		<link>http://sameshirteveryday.com/2009/04/18/missing-a-character-on-windows-with-rspec-and-cucumber/</link>
		<comments>http://sameshirteveryday.com/2009/04/18/missing-a-character-on-windows-with-rspec-and-cucumber/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 17:21:32 +0000</pubDate>
		<dc:creator>Alex Gorbatchev</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://sameshirteveryday.com/?p=190</guid>
		<description><![CDATA[
Trying to get a windows rails environment going this morning I stumbled upon something interesting &#8211; all &#8216;a&#8217; characters were missing from cucumber and rspec output.
This has something to do with UTF-8 encoding and there&#8217;s a ticket and wiki post on cucumber about it, but no solution that I found acceptable.
Everything comes down to having [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-192" title="cucumber_a_characters_missing" src="http://sameshirteveryday.com/wp-content/uploads/2009/04/cucumber_a_characters_missing.png" alt="cucumber_a_characters_missing" width="800" height="127" /></p>
<p>Trying to get a windows rails environment going this morning I stumbled upon something interesting &#8211; all &#8216;a&#8217; characters were missing from cucumber and rspec output.</p>
<p>This has something to do with UTF-8 encoding and there&#8217;s a <a href="https://rspec.lighthouseapp.com/projects/16211/tickets/81-windows-all-the-a-characters-in-the-output-have-gone-on-strike">ticket</a> and <a href="http://wiki.github.com/aslakhellesoy/cucumber/troubleshooting">wiki post</a> on cucumber about it, but no solution that I found acceptable.</p>
<p>Everything comes down to having change encoding in the current cmd window. This is achieved via a simple call to <code>chcp 1252</code>, but nobody want&#8217;s to do this every time, right?</p>
<p>To get this executed automaticaly and without resorting to serious registry editing, simply add this line to your <code>cucmber.bat</code> and any other batch files that are exhibiting this problem. You can find <code>cucumber.bat</code> in your <code>/ruby/bin</code> folder.</p>
<p>Here&#8217;s what it looks like:</p>
<pre>chcp 1252
@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"ruby.exe" "c:/ruby/bin/cucumber" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@"ruby.exe" "%~dpn0" %*</pre>
]]></content:encoded>
			<wfw:commentRss>http://sameshirteveryday.com/2009/04/18/missing-a-character-on-windows-with-rspec-and-cucumber/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>RIO &#8211; wrong number of arguments on rmtree, mkpath etc</title>
		<link>http://sameshirteveryday.com/2007/12/12/rio-wrong-number-of-arguments-on-rmtree-mkpath-etc/</link>
		<comments>http://sameshirteveryday.com/2007/12/12/rio-wrong-number-of-arguments-on-rmtree-mkpath-etc/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 17:11:22 +0000</pubDate>
		<dc:creator>Alex Gorbatchev</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.sameshirteveryday.com/2007/12/12/rio-wrong-number-of-arguments-on-rmtree-mkpath-etc/</guid>
		<description><![CDATA[It&#8217;s nice to do some Ruby once in a while. Lately I&#8217;ve been involved in a Silverlight project and haven&#8217;t touched Ruby in 2 months (hence the lack of activity on my Ruby blog). However, I&#8217;m making a build script in Ruby.
I have run into a weird exception when using my favorite IO gem RIO [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s nice to do some Ruby once in a while. Lately I&#8217;ve been involved in a Silverlight project and haven&#8217;t touched Ruby in 2 months (hence the lack of activity on my Ruby blog). However, I&#8217;m making a build script in Ruby.</p>
<p>I have run into a weird exception when using my favorite IO gem <a href="http://www.noobkit.com/show/ruby/gems/io/rio/rio.html">RIO</a> (btw, Noobkit page got beaten with the ugly stick and parser needs a spanking).</p>
<p>Exception occur when calling <code>rio(...).rmtree</code> or <code>rio(...).mkpath</code> or <code>rio(...).mkdir</code>. It reads as follows: &#8220;wrong number of arguments (0 for 1)&#8221;. I know for a fact that these methods don&#8217;t take any arguments, but just for kicks, passing a single random argument results in an ironic &#8220;wrong number of arguments (1 for 0)&#8221;.</p>
<p>Basically the problem came down to the fact that <strong>RIO doesn&#8217;t like Rake</strong>. I can live without Rake, but not without RIO.</p>
]]></content:encoded>
			<wfw:commentRss>http://sameshirteveryday.com/2007/12/12/rio-wrong-number-of-arguments-on-rmtree-mkpath-etc/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Bash script to install Gems</title>
		<link>http://sameshirteveryday.com/2007/10/24/bash-script-to-install-gems/</link>
		<comments>http://sameshirteveryday.com/2007/10/24/bash-script-to-install-gems/#comments</comments>
		<pubDate>Wed, 24 Oct 2007 15:16:19 +0000</pubDate>
		<dc:creator>Alex Gorbatchev</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.sameshirteveryday.com/2007/10/24/bash-script-to-install-gems/</guid>
		<description><![CDATA[I looked all over and couldn&#8217;t find a bash script which could check and if missing install a list of gems. I had to hack my own up:

GEMS=( `cat gems.txt` ) # gems.txt has one gem name per line

for gem in "${GEMS[@]}"; do
  found=`gem list $gem &#124; grep -i $gem`
  if [ "$found" [...]]]></description>
			<content:encoded><![CDATA[<p>I looked all over and couldn&#8217;t find a bash script which could check and if missing install a list of gems. I had to hack my own up:</p>
<pre>
GEMS=( `cat gems.txt` ) # gems.txt has one gem name per line

for gem in "${GEMS[@]}"; do
  found=`gem list $gem | grep -i $gem`
  if [ "$found" != "" ]; then
    parts=( $found )
    echo "Found ${parts[0]} ${parts[1]}"
    continue
  fi

  echo "---------------------------"
  echo "Installing $gem"
  sudo gem install $gem -y
  echo "---------------------------"
done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://sameshirteveryday.com/2007/10/24/bash-script-to-install-gems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>it_only: running a single example in RSpec</title>
		<link>http://sameshirteveryday.com/2007/10/15/it_only-running-a-single-example-in-rspec/</link>
		<comments>http://sameshirteveryday.com/2007/10/15/it_only-running-a-single-example-in-rspec/#comments</comments>
		<pubDate>Mon, 15 Oct 2007 16:37:06 +0000</pubDate>
		<dc:creator>Alex Gorbatchev</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.sameshirteveryday.com/2007/10/15/it_only-running-a-single-example-in-rspec/</guid>
		<description><![CDATA[Sometimes you want to focus on just one example in your RSpec file. I had to do this quite often in the last 3 days and I got tired of commenting out stuff back and forth. So, I give you &#8220;it_only&#8221; example.

module Spec
  module DSL
    module BehaviourEval
     [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you want to focus on just one example in your RSpec file. I had to do this quite often in the last 3 days and I got tired of commenting out stuff back and forth. So, I give you &#8220;<code>it_only</code>&#8221; example.</p>
<pre name="code" class="ruby">
module Spec
  module DSL
    module BehaviourEval
      module ModuleMethods
        def it(description = :__generate_description, opts = {}, &amp;block)
          return if @it_only_found
          examples &lt;&lt; Example.new(description, opts, &amp;block)
        end

        # Same as +it+ only blocks all other examples making this the
        # only example that would run.
        def it_only(description = :__generate_description, opts = {}, &amp;block)
          @it_only_found = true
          @examples = [Example.new(description, opts, &amp;block)]
        end
      end
    end
  end
end</pre>
<p>Drop this into your <code>spec_helper.rb</code> and now if you want to focus on a single example, just make it &#8220;<code>it_only</code>&#8221; instead of &#8220;<code>it</code>&#8220;.</p>
]]></content:encoded>
			<wfw:commentRss>http://sameshirteveryday.com/2007/10/15/it_only-running-a-single-example-in-rspec/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Installing Ruby Gems with native extensions in Ubuntu</title>
		<link>http://sameshirteveryday.com/2007/10/05/installing-ruby-gems-with-native-extensions-in-ubuntu/</link>
		<comments>http://sameshirteveryday.com/2007/10/05/installing-ruby-gems-with-native-extensions-in-ubuntu/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 23:09:50 +0000</pubDate>
		<dc:creator>Alex Gorbatchev</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.sameshirteveryday.com/2007/10/05/installing-ruby-gems-with-native-extensions-in-ubuntu/</guid>
		<description><![CDATA[I&#8217;ve recently started experimenting with using Ubuntu for my Ruby development. Some of the Gems like JSON and HPricot have extension compilation step which doesn&#8217;t work on a default Ubuntu installation.
Here are a few steps that you need to get it to work.

Open up Synaptic Package Manager from System &#62; Preferences
Search for &#8220;ruby1.8-dev&#8221;, right click [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently started experimenting with using Ubuntu for my Ruby development. Some of the Gems like JSON and HPricot have extension compilation step which doesn&#8217;t work on a default Ubuntu installation.</p>
<p>Here are a few steps that you need to get it to work.</p>
<ol>
<li>Open up Synaptic Package Manager from System &gt; Preferences</li>
<li>Search for &#8220;ruby1.8-dev&#8221;, right click and check &#8220;Mark for installation&#8221;</li>
<li>Search for &#8220;build-essential&#8221; and mark it for installation as well</li>
<li>Click &#8220;Apply&#8221; in the toolbar</li>
</ol>
<p>After the update is finished, you should be able to install Gems which require native extensions compilation.</p>
]]></content:encoded>
			<wfw:commentRss>http://sameshirteveryday.com/2007/10/05/installing-ruby-gems-with-native-extensions-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance where not expected or gsub vs sub string</title>
		<link>http://sameshirteveryday.com/2007/09/29/performance-where-not-expected-or-gsub-vs-sub-string/</link>
		<comments>http://sameshirteveryday.com/2007/09/29/performance-where-not-expected-or-gsub-vs-sub-string/#comments</comments>
		<pubDate>Sat, 29 Sep 2007 22:57:22 +0000</pubDate>
		<dc:creator>Alex Gorbatchev</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.sameshirteveryday.com/2007/09/29/performance-where-not-expected-or-gsub-vs-sub-string/</guid>
		<description><![CDATA[If I were to be asked what is faster, regular sub string operation or a regular expression, I would without hesitation answer that sub string is.
This was the assumption that I approached a simple task with &#8211; stripping slashes from beginning and end of a string. Here&#8217;s the code:

path = path[1..-1] if path[0, 1] == [...]]]></description>
			<content:encoded><![CDATA[<p>If I were to be asked what is faster, regular sub string operation or a regular expression, I would without hesitation answer that sub string is.</p>
<p>This was the assumption that I approached a simple task with &#8211; stripping slashes from beginning and end of a string. Here&#8217;s the code:</p>
<pre name="code" class="ruby">
path = path[1..-1] if path[0, 1] == '/'
path = path[0..-2] if path[-1, 1] == '/'</pre>
<p>I would naturally assume that the block above would be faster than <code>path.gsub!(/^\/|\/$/, '')</code>. But just in case, lets benchmark to be sure.</p>
<pre name="code" class="ruby">
require 'benchmark'

original = '/hello/somewhat/long/path/here/'
max = 1_000_000

puts Benchmark.measure {
  1.upto(max) do
    path = original
    path = path[1..-1] if path[0, 1] == '/'
    path = path[0..-2] if path[-1, 1] == '/'
  end
}

puts Benchmark.measure {
  1.upto(max) do
    path = original
    path.gsub!(/^/|/$/, '')
  end
}

# prints out
  4.212000   0.000000   4.212000 (  4.270000)
  2.418000   0.000000   2.418000 (  2.435000)
</pre>
<p>I don&#8217;t understand why, but <code>gsub</code> is 57% faster. I find it hard to believe that a few extra Ruby statements introduce so much overhead that it becomes slower than entire regular expressions engine. Anyone has any explanation for this?</p>
]]></content:encoded>
			<wfw:commentRss>http://sameshirteveryday.com/2007/09/29/performance-where-not-expected-or-gsub-vs-sub-string/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ruby: get full history (all parents) of a hash node</title>
		<link>http://sameshirteveryday.com/2007/09/23/ruby-get-full-history-all-parents-of-a-hash-node/</link>
		<comments>http://sameshirteveryday.com/2007/09/23/ruby-get-full-history-all-parents-of-a-hash-node/#comments</comments>
		<pubDate>Sun, 23 Sep 2007 16:30:22 +0000</pubDate>
		<dc:creator>Alex Gorbatchev</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.sameshirteveryday.com/2007/09/23/ruby-get-full-history-all-parents-of-a-hash-node/</guid>
		<description><![CDATA[Nested hashes could be used to represent tree structures. Here&#8217;s a code to to find a node by key and get all of its parents:

def hash_history(hash, desired_key, &#038;block)
  return false unless Hash === hash

  hash.each_pair do &#124;key, value&#124;
    if key == desired_key or hash_history(value, desired_key, &#038;block)
     [...]]]></description>
			<content:encoded><![CDATA[<p>Nested hashes could be used to represent tree structures. Here&#8217;s a code to to find a node by key and get all of its parents:</p>
<pre name="code" class="ruby">
def hash_history(hash, desired_key, &#038;block)
  return false unless Hash === hash

  hash.each_pair do |key, value|
    if key == desired_key or hash_history(value, desired_key, &#038;block)
      yield(key, value)
      return true
    end
  end

  return false
end

hash = {
  :level_1 => {
    :level_2 => {
      :level_3 => {
        :search => 'test'
      }
    }
  }
}

hash_history(hash, :search) { |key, value| puts key }

# prints out...
# search
# level_3
# level_2
# level_1
</pre>
]]></content:encoded>
			<wfw:commentRss>http://sameshirteveryday.com/2007/09/23/ruby-get-full-history-all-parents-of-a-hash-node/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>RDoc bug: visiblity of attributes is always public</title>
		<link>http://sameshirteveryday.com/2007/09/22/rdoc-bug-visiblity-of-attributes-is-always-public/</link>
		<comments>http://sameshirteveryday.com/2007/09/22/rdoc-bug-visiblity-of-attributes-is-always-public/#comments</comments>
		<pubDate>Sat, 22 Sep 2007 21:41:57 +0000</pubDate>
		<dc:creator>Alex Gorbatchev</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.sameshirteveryday.com/2007/09/22/rdoc-bug-visiblity-of-attributes-is-always-public/</guid>
		<description><![CDATA[It would appear that RDoc Ruby parser in Ruby 1.8.6 has a bug which leads to attributes always being public.
Here&#8217;s the fix in parser_rb.rb:

...

def parse_attr(context, single, tk, comment)
  args = parse_symbol_arg(1)
  if args.size > 0
    name = args[0]
    rw = "R"
    skip_tkspace(false)
   [...]]]></description>
			<content:encoded><![CDATA[<p>It would appear that RDoc Ruby parser in Ruby 1.8.6 has a bug which leads to attributes always being public.</p>
<p>Here&#8217;s the fix in <code>parser_rb.rb</code>:</p>
<pre name="code" class="ruby">
...

def parse_attr(context, single, tk, comment)
  args = parse_symbol_arg(1)
  if args.size > 0
    name = args[0]
    rw = "R"
    skip_tkspace(false)
    tk = get_tk
    if tk.kind_of? TkCOMMA
      rw = "RW" if get_bool
    else
      unget_tk tk
    end
    att = Attr.new(get_tkread, name, rw, comment)
    att.top_level = @top_level
    att.visibility = context.visibility  ######### NEW LINE ##########
    read_documentation_modifiers(att, ATTR_MODIFIERS)
    if att.document_self
      context.add_attribute(att)
    end
  else
    warn("'attr' ignored - looks like a variable")
  end
end

...

def parse_attr_accessor(context, single, tk, comment)
  args = parse_symbol_arg
  read = get_tkread
  rw = "?"

  # If nodoc is given, don't document any of them

  tmp = CodeObject.new
  read_documentation_modifiers(tmp, ATTR_MODIFIERS)
  return unless tmp.document_self

  case tk.name
  when "attr_reader"   then rw = "R"
  when "attr_writer"   then rw = "W"
  when "attr_accessor" then rw = "RW"
  else
    rw = @options.extra_accessor_flags[tk.name]
  end

  for name in args
    att = Attr.new(get_tkread, name, rw, comment)
    att.top_level = @top_level
    att.visibility = context.visibility   ######### NEW LINE ##########
    context.add_attribute(att)
  end
end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://sameshirteveryday.com/2007/09/22/rdoc-bug-visiblity-of-attributes-is-always-public/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
