Skip to content

Commit

Permalink
Remove more warnings: no need to define attr_accessor if already exis…
Browse files Browse the repository at this point in the history
…ts. Initialize ivar.
  • Loading branch information
miloops committed Sep 28, 2010
1 parent 19d9fff commit 3f94b45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions actionpack/lib/action_controller/test_case.rb
Expand Up @@ -462,9 +462,11 @@ def build_request_uri(action, parameters)
# The exception is stored in the exception accessor for further inspection. # The exception is stored in the exception accessor for further inspection.
module RaiseActionExceptions module RaiseActionExceptions
def self.included(base) def self.included(base)
base.class_eval do unless base.method_defined?(:exception) && base.method_defined?(:exception=)
attr_accessor :exception base.class_eval do
protected :exception, :exception= attr_accessor :exception
protected :exception, :exception=
end
end end
end end


Expand Down
1 change: 1 addition & 0 deletions actionpack/test/controller/render_test.rb
Expand Up @@ -327,6 +327,7 @@ def render_to_string_test
end end


def default_render def default_render
@alternate_default_render ||= nil
if @alternate_default_render if @alternate_default_render
@alternate_default_render.call @alternate_default_render.call
else else
Expand Down

0 comments on commit 3f94b45

Please sign in to comment.