ruby-changes:50152
From: marcandre <ko1@a...>
Date: Wed, 7 Feb 2018 08:47:53 +0900 (JST)
Subject: [ruby-changes:50152] marcandRe: r62270 (trunk): lib/matrix.rb: Document deprecated methods [#12032] [doc] [ci-skip]
marcandre 2018-02-07 08:47:49 +0900 (Wed, 07 Feb 2018) New Revision: 62270 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62270 Log: lib/matrix.rb: Document deprecated methods [#12032] [doc] [ci-skip] Modified files: trunk/lib/matrix.rb Index: lib/matrix.rb =================================================================== --- lib/matrix.rb (revision 62269) +++ lib/matrix.rb (revision 62270) @@ -1446,16 +1446,25 @@ class Matrix https://github.com/ruby/ruby/blob/trunk/lib/matrix.rb#L1446 @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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/