Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make guides generation work for Ruby 1.9.x

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
commit e17b23db016c03801ade2666793b4a51583f3785 1 parent 0fc6418
@radar radar authored lifo committed
View
2  railties/guides/rails_guides/generator.rb
@@ -95,7 +95,7 @@ def set_index(body, view)
view.content_tag(:li, l)
end
- children_ul = view.content_tag(:ul, children)
+ children_ul = view.content_tag(:ul, children.join(" "))
index << view.content_tag(:li, link + children_ul)
end
View
4 railties/guides/rails_guides/indexer.rb
@@ -19,9 +19,9 @@ def process(string, current_level= 3, counters = [1])
level_hash = ActiveSupport::OrderedHash.new
while !s.eos?
- s.match?(/\h[0-9]\..*$/)
+ s.match?(/h[0-9]\..*$/)
if matched = s.matched
- matched =~ /\h([0-9])\.(.*)$/
+ matched =~ /h([0-9])\.(.*)$/
level, title = $1.to_i, $2
if level < current_level
Please sign in to comment.
Something went wrong with that request. Please try again.