diff --git a/lib/docs/filters/rails/clean_html_guides.rb b/lib/docs/filters/rails/clean_html_guides.rb
index a40dcba0..0c39d137 100644
--- a/lib/docs/filters/rails/clean_html_guides.rb
+++ b/lib/docs/filters/rails/clean_html_guides.rb
@@ -24,7 +24,9 @@ module Docs
css('pre').each do |node|
code = node.at_css('code')
- language = code['class'][/highlight ?(\w+)/, 1]
+ language = code['class']
+ break if language.nil?
+ language = language [/highlight ?(\w+)/, 1]
node['data-language'] = language unless language == 'plain'
code.remove_attribute('class')
node.content = node.content.strip
diff --git a/lib/docs/scrapers/rdoc/rails.rb b/lib/docs/scrapers/rdoc/rails.rb
index a4bde522..3f2e1f27 100644
--- a/lib/docs/scrapers/rdoc/rails.rb
+++ b/lib/docs/scrapers/rdoc/rails.rb
@@ -109,7 +109,6 @@ module Docs
def get_latest_version(opts)
doc = fetch_doc('https://rubyonrails.org/', opts)
- doc
doc.at_css('.heading__button span').content.scan(/\d\.\d*\.*\d*\.*\d*/)[0]
end
end