diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-06-11 23:20:19 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-06-28 14:46:23 -0700 |
commit | 198ec03f5220f9c8ba363011f70a1c487c10b07e (patch) | |
tree | 39d6cf8774349026bdaaabe83d4503feeca2883e /actionpack/lib/action_view/helpers/prototype_helper.rb | |
parent | ec18719b81e117215fefb33aff5ed43472bce048 (diff) | |
download | rails-198ec03f5220f9c8ba363011f70a1c487c10b07e.tar.gz rails-198ec03f5220f9c8ba363011f70a1c487c10b07e.tar.bz2 rails-198ec03f5220f9c8ba363011f70a1c487c10b07e.zip |
returning -> tap
Diffstat (limited to 'actionpack/lib/action_view/helpers/prototype_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/prototype_helper.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index bfb8f74a00..678e6348b6 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -1,6 +1,5 @@ require 'set' require 'active_support/json' -require 'active_support/core_ext/object/returning' require 'active_support/core_ext/object/blank' module ActionView @@ -228,7 +227,7 @@ module ActionView # <script> tag. module GeneratorMethods def to_s #:nodoc: - returning javascript = @lines * $/ do + (@lines * $/).tap do |javascript| if ActionView::Base.debug_rjs source = javascript.dup javascript.replace "try {\n#{source}\n} catch (e) " @@ -530,9 +529,9 @@ module ActionView end def record(line) - returning line = "#{line.to_s.chomp.gsub(/\;\z/, '')};" do - self << line - end + line = "#{line.to_s.chomp.gsub(/\;\z/, '')};" + self << line + line end def render(*options) |