[Ruby] 看起來像是Numeric#quo的bug?
在啃Ruby API的時候發現到的
$ irb
You're using: Ruby-1.8.7-p334
ruby-1.8.7-p334 :001 > 10.quo 3
=> 3.33333333333333
$ irb
You're using: Ree-1.8.7-2010.02
ree-1.8.7-2010.02 :001 > 10.quo 3
=> 3.33333333333333
$ irb
You're using: Macruby 1.9.2
irb(main):001:0> 10.quo 3
=> (10/3)
$ irb
You're using: Ruby 1.9.3-preview1
ruby-1.9.3-preview1 :001 > 10.quo 3
=> (10/3)
$ irb
You're using: Ruby 1.9.2-p180
ruby-1.9.2-p180 :001 > 10.quo 3
=> 103 <-- 這個看起來怪怪的..
我的環境
$ rvm list
rvm rubies
jruby-1.6.3 [ darwin-x86_64-java ]
kiji-head [ x86_64 ]
macruby-0.10 [ x86_64 ]
ree-1.8.7-2010.02 [ x86_64 ]
=> ruby-1.8.7-p334 [ x86_64 ]
ruby-1.9.2-p180 [ x86_64 ]
ruby-1.9.3-preview1 [ x86_64 ]
$ uname -a
Darwin Syphilis.local 10.8.0 Darwin Kernel Version 10.8.0:
Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64
其實不是很重要的事,這個method在案子裡也幾乎不會用到
只是好奇是Bug還是只有我電腦才這樣..:)
eddie
--
http://www.eddie.com.tw/
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.34.109.79
※ 編輯: aquarianboy 來自: 114.34.109.79 (08/15 16:24)
→
08/15 19:50, , 1F
08/15 19:50, 1F
推
08/15 21:04, , 2F
08/15 21:04, 2F
→
08/15 21:04, , 3F
08/15 21:04, 3F
→
08/15 22:21, , 4F
08/15 22:21, 4F
推
08/16 00:26, , 5F
08/16 00:26, 5F
推
08/16 03:06, , 6F
08/16 03:06, 6F
推
08/16 22:08, , 7F
08/16 22:08, 7F
→
08/16 22:09, , 8F
08/16 22:09, 8F
→
08/16 22:09, , 9F
08/16 22:09, 9F
→
08/16 22:10, , 10F
08/16 22:10, 10F
→
08/16 22:11, , 11F
08/16 22:11, 11F
推
08/16 23:02, , 12F
08/16 23:02, 12F
→
08/17 01:34, , 13F
08/17 01:34, 13F
→
08/17 01:36, , 14F
08/17 01:36, 14F
推
08/17 11:13, , 15F
08/17 11:13, 15F
推
08/17 11:18, , 16F
08/17 11:18, 16F
→
08/17 11:54, , 17F
08/17 11:54, 17F
→
08/17 11:55, , 18F
08/17 11:55, 18F
→
08/17 11:57, , 19F
08/17 11:57, 19F
→
08/17 12:05, , 20F
08/17 12:05, 20F
→
08/17 19:53, , 21F
08/17 19:53, 21F
推
08/18 14:28, , 22F
08/18 14:28, 22F
推
08/18 14:39, , 23F
08/18 14:39, 23F
Ruby 近期熱門文章
PTT數位生活區 即時熱門文章