# \[Bug #667\] yaml $B$,(B Complex$B!"(BRational $B$r$&$^$/$"$D$+$($F$$$J$$(B

**URL:** <https://www.ruby-forum.com/t/bug-667-yaml-b-b-complex-b-brational-b-r-d-f-j-b/151347>\
**Category:** Development\
**Created:** [October 20, 2008, 4:31pm UTC](https://www.ruby-forum.com/t/bug-667-yaml-b-b-complex-b-brational-b-r-d-f-j-b/151347 "2008-10-20T16:31:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tadayoshi\_funaba](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/f0a364/32.png) [@tadayoshi\_funaba](https://www.ruby-forum.com/u/tadayoshi_funaba)\
**Post date:** [October 20, 2008, 4:31pm UTC](https://www.ruby-forum.com/t/bug-667-yaml-b-b-complex-b-brational-b-r-d-f-j-b/151347/1 "2008-10-20T16:31:56Z")

</div>

Bug #667: yaml e$B$,e(B Complexe$B!“e(BRational  
e$B$r$&$^$/$”$D$+$($F$$$J$$e(B  
[http://redmine.ruby-lang.org/issues/show/667](http://redmine.ruby-lang.org/issues/show/667)

e$B5/I\<\<Te(B: tadayoshi funaba  
e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal

e$BAH$_9~$_$KBP1~$G$-$F$$$^$;$s!#e(B

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)
