Project

General

Profile

Feature #12032 ยป 0001-adding-documentation-for-matrix.rb.patch

Oneill38 (Megan O'Neill), 01/29/2016 03:51 AM

View differences:

lib/matrix.rb
@elements.dup
end
# Deprecated
#
# Returns each element of the vector as a float.
def elements_to_f
warn "#{caller(1)[0]}: warning: Vector#elements_to_f is deprecated"
map(&:to_f)
end
# Deprecated
#
# Returns each element of the vector as an integer.
def elements_to_i
warn "#{caller(1)[0]}: warning: Vector#elements_to_i is deprecated"
map(&:to_i)
end
# Deprecated
#
# Returns each element of the vector as a rational.
def elements_to_r
warn "#{caller(1)[0]}: warning: Vector#elements_to_r is deprecated"
map(&:to_r)
    (1-1/1)