Permalink
Browse files

Remove special case for 1.9.1

  • Loading branch information...
1 parent 10a8ffa commit 5e6cafa44d635d4aff9f5d0beec8a7ad501a76c6 @guilleiguaran guilleiguaran committed May 19, 2012
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

0 comments on commit 5e6cafa

Please sign in to comment.