# Possible BUG on rails 2.2.3 with ruby 1.8.7 patchlevel 174

**URL:** <https://www.ruby-forum.com/t/possible-bug-on-rails-2-2-3-with-ruby-1-8-7-patchlevel-174/173967>\
**Category:** Rails\
**Created:** [August 18, 2009, 8:29pm UTC](https://www.ruby-forum.com/t/possible-bug-on-rails-2-2-3-with-ruby-1-8-7-patchlevel-174/173967 "2009-08-18T20:29:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xinobit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/9dc877/32.png) [@Xinobit](https://www.ruby-forum.com/u/Xinobit)\
**Post date:** [August 18, 2009, 8:29pm UTC](https://www.ruby-forum.com/t/possible-bug-on-rails-2-2-3-with-ruby-1-8-7-patchlevel-174/173967/1 "2009-08-18T20:29:58Z")

</div>

Try this in a view running rails 2.2.3 with ruby 1.8.7. I tried in  
1.8.6 and worked just as expected. But in 1.8.7 it doesn’t execute the  
code inside a condition that has a comment. Sample:

\<% if (@var)%\>  
@var is nil so it wont get in here  
\<% else # a comment %\>  
it must to get in here, but it doesnt unless the comment in the above  
condition is removed.  
\<% end %\>

---

<div class="post-metadata">

**Author:** ![Xinobit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/9dc877/32.png) [@Xinobit](https://www.ruby-forum.com/u/Xinobit)\
**Post date:** [August 18, 2009, 8:32pm UTC](https://www.ruby-forum.com/t/possible-bug-on-rails-2-2-3-with-ruby-1-8-7-patchlevel-174/173967/2 "2009-08-18T20:32:54Z")

</div>

On Aug 18, 4:07 pm, Xinobit [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Try this in a view running rails 2.2.3 with ruby 1.8.7. I tried in  
> 1.8.6 and worked just as expected. But in 1.8.7 it doesn’t execute the  
> code inside a condition that has a comment. Sample:

This is a ruby 1.8.7 change. Apparently comments like that were never  
allowed in the first place ([Ruby 1.8.7 has been released - Ruby - Ruby-Forum](http://www.ruby-forum.com/topic/154835) )

Fred
