On 15 Feb 2006, at 18:51, Fred B. wrote:
When using erb (example taken from Programing Ruby):
---------
#!/usr/local/bin/ruby
require 'erb'
input = %{\
<% high.downto(low) do |n| # set high, low externally %>
<%= n %> green bottles, hanging on the wall
<%= n %> green bottles, hanging on the wall
And if one green bottle should accidentally fall
There'd be <%= n-1 %> green bottles, hanging on the wall
<% end %>
}
high,low = 10, 6
erb = ERB.new(input)
erb.run
-----------
I get:
RubyMate r2496 running Ruby v1.8.4.
>>> ~/bin/test.rb
/Library/Application Support/TextMate/Bundles/Ruby.tmbundle/Support/tmruby.rb:180: bad value for range (ArgumentError)
from /Library/Application Support/TextMate/Bundles/Ruby.tmbundle/Support/tmruby.rb:120