diff options
author | Sergey Nartimov <just.lest@gmail.com> | 2012-01-07 15:30:05 +0300 |
---|---|---|
committer | Sergey Nartimov <just.lest@gmail.com> | 2012-01-07 15:30:05 +0300 |
commit | 8c63e7d35db1f412f0d7c065e7191f99bda652e3 (patch) | |
tree | c5ad5efdb499c92f002c27761b6920e2c386fdfa /actionpack/lib/action_view/test_case.rb | |
parent | 0c1846e4091dcdd48b35909b5bb3b00c58fa9d10 (diff) | |
download | rails-8c63e7d35db1f412f0d7c065e7191f99bda652e3.tar.gz rails-8c63e7d35db1f412f0d7c065e7191f99bda652e3.tar.bz2 rails-8c63e7d35db1f412f0d7c065e7191f99bda652e3.zip |
instance_variables method returns symbols in 1.9 ruby
Diffstat (limited to 'actionpack/lib/action_view/test_case.rb')
-rw-r--r-- | actionpack/lib/action_view/test_case.rb | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb index 9ebe498192..c734c914db 100644 --- a/actionpack/lib/action_view/test_case.rb +++ b/actionpack/lib/action_view/test_case.rb @@ -183,32 +183,32 @@ module ActionView alias_method :_view, :view - INTERNAL_IVARS = %w{ - @__name__ - @__io__ - @_assertion_wrapped - @_assertions - @_result - @_routes - @controller - @layouts - @locals - @method_name - @output_buffer - @partials - @passed - @rendered - @request - @routes - @templates - @options - @test_passed - @view - @view_context_class - } + INTERNAL_IVARS = [ + :@__name__, + :@__io__, + :@_assertion_wrapped, + :@_assertions, + :@_result, + :@_routes, + :@controller, + :@layouts, + :@locals, + :@method_name, + :@output_buffer, + :@partials, + :@passed, + :@rendered, + :@request, + :@routes, + :@templates, + :@options, + :@test_passed, + :@view, + :@view_context_class + ] def _user_defined_ivars - instance_variables.map(&:to_s) - INTERNAL_IVARS + instance_variables - INTERNAL_IVARS end # Returns a Hash of instance variables and their values, as defined by @@ -216,8 +216,8 @@ module ActionView # rendered. This is generally intended for internal use and extension # frameworks. def view_assigns - Hash[_user_defined_ivars.map do |var| - [var[1, var.length].to_sym, instance_variable_get(var)] + Hash[_user_defined_ivars.map do |ivar| + [ivar[1..-1].to_sym, instance_variable_get(ivar)] end] end |