diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-11 18:45:58 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-11 18:45:58 +0000 |
commit | 3f64c83eb1b698b18ab9c71abc6815537485ef89 (patch) | |
tree | 05771c436c6e6e48c1c98c12dc99b3551c9b4b3c /lib/matrix.rb | |
parent | e0cfb13c32979dee608812a38c16c518ab9557c7 (diff) |
* lib/matrix.rb: Deprecate elements_to_{f/i/r}
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/matrix.rb')
-rw-r--r-- | lib/matrix.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/matrix.rb b/lib/matrix.rb index 83ce3adda9..2b73209659 100644 --- a/lib/matrix.rb +++ b/lib/matrix.rb @@ -1009,15 +1009,18 @@ class Matrix end def elements_to_f - collect{|e| e.to_f} + warn "#{caller(1)[0]}: warning: Matrix#elements_to_f is deprecated" + map(&:to_f) end def elements_to_i - collect{|e| e.to_i} + warn "#{caller(1)[0]}: warning: Matrix#elements_to_i is deprecated" + map(&:to_i) end def elements_to_r - collect{|e| e.to_r} + warn "#{caller(1)[0]}: warning: Matrix#elements_to_r is deprecated" + map(&:to_r) end #-- |