diff --git a/ChangeLog b/ChangeLog index eae52af21a..64ef75244f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Apr 12 03:45:25 2010 Marc-Andre Lafortune + + * lib/matrix.rb: Deprecate elements_to_{f/i/r} + Mon Apr 12 03:30:29 2010 Marc-Andre Lafortune * lib/matrix.rb: Handle coercion errors by raising TypeErrors 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 #--