Project

General

Profile

Actions

Bug #667

closed

yaml が Complex、Rational をうまくあつかえていない

Added by tadf (tadayoshi funaba) about 16 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
Backport:

Description

=begin
組み込みに対応できていません。

main@187-20080811> Rational(1,2).to_yaml
#=> "--- !ruby/object:Rational \ndenominator: 2\nnumerator: 1\n"
main@187-20080811> YAML.load(Rational(1,2).to_yaml)
#=> Rational(1, 2)

main@190-20081020> Rational(1,2).to_yaml
#=> "--- !ruby/object:Rational {}\n\n"
main@190-20081020> YAML.load(Rational(1,2).to_yaml)
#=> (0/1)
=end


Files

yaml-fix-suport-for-ratoinal-and-complex.diff (2.16 KB) yaml-fix-suport-for-ratoinal-and-complex.diff hiroshi (Hiroshi MORIYAMA), 10/24/2008 02:29 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0