Skip to content
Browse files

Make guides generation work for Ruby 1.9.x

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
1 parent 0fc6418 commit e17b23db016c03801ade2666793b4a51583f3785 @radar radar committed with lifo
Showing with 3 additions and 3 deletions.
  1. +1 −1 railties/guides/rails_guides/generator.rb
  2. +2 −2 railties/guides/rails_guides/indexer.rb
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

0 comments on commit e17b23d

Please sign in to comment.
Something went wrong with that request. Please try again.