Quaternion type: Difference between revisions

→‎{{header|Ruby}}: Found a bug, not fixing it now. {{incorrect}}
(→‎{{header|Ruby}}: Found a bug, not fixing it now. {{incorrect}})
Line 2,170:
 
=={{header|Ruby}}==
{{incorrect|Ruby|The <tt>coerce</tt> method reverses the operands, so <tt>5 - Quaternion.new(1, -2, -3, -4)</tt> returns <tt>(-4, -2, -3, -4)</tt>. The correct answer is <tt>(4, 2, 3, 4)</tt>.}}
<lang ruby>class Quaternion
attr_reader :a, :b, :c, :d
Anonymous user