Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #147 from guilleiguaran/remove-1-9-1-code

Remove special case for 1.9.1
  • Loading branch information...
commit 5c8c202faee83ddf0aa3f759a5562eb35fc99533 2 parents 0fd6ddb + 5e6cafa
@rtomayko authored
Showing with 0 additions and 23 deletions.
  1. +0 −23 lib/tilt/template.rb
View
23 lib/tilt/template.rb
@@ -227,28 +227,5 @@ def extract_magic_comment(script)
"# coding: #{@default_encoding}"
end
end
-
- # Special case Ruby 1.9.1's broken yield.
- #
- # http://github.com/rtomayko/tilt/commit/20c01a5
- # http://redmine.ruby-lang.org/issues/show/3601
- #
- # Remove when 1.9.2 dominates 1.9.1 installs in the wild.
- if RUBY_VERSION =~ /^1.9.1/
- undef compile_template_method
- def compile_template_method(locals)
- source, offset = precompiled(locals)
- offset += 1
- method_name = "__tilt_#{Thread.current.object_id}"
- Object.class_eval <<-RUBY, eval_file, line - offset
- TOPOBJECT.class_eval do
- def #{method_name}(locals)
- #{source}
- end
- end
- RUBY
- unbind_compiled_method(method_name)
- end
- end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.