Skip to content

Commit

Permalink
Deprecate #to_miq_a
Browse files Browse the repository at this point in the history
  • Loading branch information
bdunne committed Jul 17, 2020
1 parent 71f5866 commit b2ebaa1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/gems/pending/util/extensions/miq-array.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
require 'more_core_extensions/core_ext/array'
require 'active_support/core_ext/array/wrap'
require 'active_support/deprecation'

class Object #:nodoc:
def to_miq_a
ActiveSupport::Deprecation.warn("Object#to_miq_a should be replaced by Array.wrap", caller.drop(0))
Array.wrap(self)
end
end

class String
def to_miq_a
ActiveSupport::Deprecation.warn("String#to_miq_a should be replaced by String#lines.to_a", caller.drop(0))
lines.to_a
end
end
Expand Down

0 comments on commit b2ebaa1

Please sign in to comment.