aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorRyan Bigg <radarlistener@gmail.com>2010-01-16 10:42:04 +1000
committerPratik Naik <pratiknaik@gmail.com>2010-01-16 23:25:16 +0530
commite17b23db016c03801ade2666793b4a51583f3785 (patch)
tree6359afba1108796875a28a14a3c4ce2273255e6c /railties/guides
parent0fc6418e75626bbbd2a696bd3e354bae583d65ed (diff)
downloadrails-e17b23db016c03801ade2666793b4a51583f3785.tar.gz
rails-e17b23db016c03801ade2666793b4a51583f3785.tar.bz2
rails-e17b23db016c03801ade2666793b4a51583f3785.zip
Make guides generation work for Ruby 1.9.x
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/rails_guides/generator.rb2
-rw-r--r--railties/guides/rails_guides/indexer.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/railties/guides/rails_guides/generator.rb b/railties/guides/rails_guides/generator.rb
index cebf6ae866..e3df3be882 100644
--- a/railties/guides/rails_guides/generator.rb
+++ b/railties/guides/rails_guides/generator.rb
@@ -95,7 +95,7 @@ module RailsGuides
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
diff --git a/railties/guides/rails_guides/indexer.rb b/railties/guides/rails_guides/indexer.rb
index 5b5ad3fee1..939404c85f 100644
--- a/railties/guides/rails_guides/indexer.rb
+++ b/railties/guides/rails_guides/indexer.rb
@@ -19,9 +19,9 @@ module RailsGuides
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