summaryrefslogtreecommitdiff
path: root/lib/matrix.rb
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-11 18:50:51 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-11 18:50:51 +0000
commit521f4a4beb1623cfc911ab07a9c5c37dd0dd8988 (patch)
tree7cd6ada92898e7ef7babae29f8a6dacee7c6d0bc /lib/matrix.rb
parent3f64c83eb1b698b18ab9c71abc6815537485ef89 (diff)
* lib/matrix.rb: Deprecate Vector#elements_to{i/f/r}
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/matrix.rb')
-rw-r--r--lib/matrix.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/matrix.rb b/lib/matrix.rb
index 2b73209659..a2a3e16da4 100644
--- a/lib/matrix.rb
+++ b/lib/matrix.rb
@@ -1465,15 +1465,18 @@ class Vector
end
def elements_to_f
- collect{|e| e.to_f}
+ warn "#{caller(1)[0]}: warning: Vector#elements_to_f is deprecated"
+ map(&:to_f)
end
def elements_to_i
- collect{|e| e.to_i}
+ warn "#{caller(1)[0]}: warning: Vector#elements_to_i is deprecated"
+ map(&:to_i)
end
def elements_to_r
- collect{|e| e.to_r}
+ warn "#{caller(1)[0]}: warning: Vector#elements_to_r is deprecated"
+ map(&:to_r)
end
#