Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #11411 from dscataglini/master

Active support callback's before/after/around filters are not correctly making their singleton methods private
  • Loading branch information...
commit febfc57e56558bd6924b39a38f08d833a78e975b 2 parents 9a8af0c + cb24aa1
@tenderlove tenderlove authored
Showing with 12 additions and 6 deletions.
  1. +12 −6 activesupport/lib/active_support/callbacks.rb
View
18 activesupport/lib/active_support/callbacks.rb
@@ -131,8 +131,6 @@ def self.build(next_callback, user_callback, user_conditions, chain_config, filt
end
end
- private
-
def self.halting_and_conditional(next_callback, user_callback, user_conditions, halted_lambda, filter)
lambda { |env|
target = env.target
@@ -149,6 +147,7 @@ def self.halting_and_conditional(next_callback, user_callback, user_conditions,
next_callback.call env
}
end
+ private_class_method :halting_and_conditional
def self.halting(next_callback, user_callback, halted_lambda, filter)
lambda { |env|
@@ -166,6 +165,7 @@ def self.halting(next_callback, user_callback, halted_lambda, filter)
next_callback.call env
}
end
+ private_class_method :halting
def self.conditional(next_callback, user_callback, user_conditions)
lambda { |env|
@@ -178,6 +178,7 @@ def self.conditional(next_callback, user_callback, user_conditions)
next_callback.call env
}
end
+ private_class_method :conditional
def self.simple(next_callback, user_callback)
lambda { |env|
@@ -185,6 +186,7 @@ def self.simple(next_callback, user_callback)
next_callback.call env
}
end
+ private_class_method :simple
end
class After
@@ -208,8 +210,6 @@ def self.build(next_callback, user_callback, user_conditions, chain_config)
end
end
- private
-
def self.halting_and_conditional(next_callback, user_callback, user_conditions)
lambda { |env|
env = next_callback.call env
@@ -223,6 +223,7 @@ def self.halting_and_conditional(next_callback, user_callback, user_conditions)
env
}
end
+ private_class_method :halting_and_conditional
def self.halting(next_callback, user_callback)
lambda { |env|
@@ -233,6 +234,7 @@ def self.halting(next_callback, user_callback)
env
}
end
+ private_class_method :halting
def self.conditional(next_callback, user_callback, user_conditions)
lambda { |env|
@@ -246,6 +248,7 @@ def self.conditional(next_callback, user_callback, user_conditions)
env
}
end
+ private_class_method :conditional
def self.simple(next_callback, user_callback)
lambda { |env|
@@ -254,6 +257,7 @@ def self.simple(next_callback, user_callback)
env
}
end
+ private_class_method :simple
end
class Around
@@ -269,8 +273,6 @@ def self.build(next_callback, user_callback, user_conditions, chain_config)
end
end
- private
-
def self.halting_and_conditional(next_callback, user_callback, user_conditions)
lambda { |env|
target = env.target
@@ -288,6 +290,7 @@ def self.halting_and_conditional(next_callback, user_callback, user_conditions)
end
}
end
+ private_class_method :halting_and_conditional
def self.halting(next_callback, user_callback)
lambda { |env|
@@ -305,6 +308,7 @@ def self.halting(next_callback, user_callback)
end
}
end
+ private_class_method :halting
def self.conditional(next_callback, user_callback, user_conditions)
lambda { |env|
@@ -322,6 +326,7 @@ def self.conditional(next_callback, user_callback, user_conditions)
end
}
end
+ private_class_method :conditional
def self.simple(next_callback, user_callback)
lambda { |env|
@@ -332,6 +337,7 @@ def self.simple(next_callback, user_callback)
env
}
end
+ private_class_method :simple
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.