1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

lib/matrix.rb: Document deprecated methods [#12032] [doc] [ci-skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
marcandre 2018-02-06 23:47:49 +00:00
parent d3a76565de
commit d3513d313e

View file

@ -1446,16 +1446,25 @@ class Matrix
@rows.collect(&:dup)
end
# Deprecated.
#
# Use map(&:to_f)
def elements_to_f
warn "Matrix#elements_to_f is deprecated, use map(&:to_f)", uplevel: 1
map(&:to_f)
end
# Deprecated.
#
# Use map(&:to_i)
def elements_to_i
warn "Matrix#elements_to_i is deprecated, use map(&:to_i)", uplevel: 1
map(&:to_i)
end
# Deprecated.
#
# Use map(&:to_r)
def elements_to_r
warn "Matrix#elements_to_r is deprecated, use map(&:to_r)", uplevel: 1
map(&:to_r)