Skip to content

Commit

Permalink
Merge pull request #15100 from eileencodes/remove-deprecation-warning…
Browse files Browse the repository at this point in the history
…-no-longer-needed

remove deprecation warning
  • Loading branch information
chancancode committed May 14, 2014
2 parents 348af15 + b342d2b commit 522110a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions activesupport/CHANGELOG.md
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,7 @@
* Remove deprecated string based terminators for `ActiveSupport::Callbacks`.

*Eileen M. Uchitelle*

* Fixed an issue when using * Fixed an issue when using
`ActiveSupport::NumberHelper::NumberToDelimitedConverter` to `ActiveSupport::NumberHelper::NumberToDelimitedConverter` to
convert a value that is an `ActiveSupport::SafeBuffer` introduced convert a value that is an `ActiveSupport::SafeBuffer` introduced
Expand Down
6 changes: 0 additions & 6 deletions activesupport/lib/active_support/callbacks.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -724,12 +724,6 @@ def reset_callbacks(name)
# would call <tt>Audit#save</tt>. # would call <tt>Audit#save</tt>.
def define_callbacks(*names) def define_callbacks(*names)
options = names.extract_options! options = names.extract_options!
if options.key?(:terminator) && String === options[:terminator]
ActiveSupport::Deprecation.warn "String based terminators are deprecated, please use a lambda"
value = options[:terminator]
line = class_eval "lambda { |result| #{value} }", __FILE__, __LINE__
options[:terminator] = lambda { |target, result| target.instance_exec(result, &line) }
end


names.each do |name| names.each do |name|
class_attribute "_#{name}_callbacks" class_attribute "_#{name}_callbacks"
Expand Down

0 comments on commit 522110a

Please sign in to comment.