From: Yukihiro Matsumoto Date: 2012-12-10T14:27:16+09:00 Subject: [ruby-core:50727] Re: [ruby-trunk - Feature #7517] Fixnum::MIN,MAX Hi, In message "Re: [ruby-core:50708] [ruby-trunk - Feature #7517] Fixnum::MIN,MAX" on Sun, 9 Dec 2012 21:07:37 +0900, "mame (Yusuke Endoh)" writes: |Still, I'm not sure what problem (in mruby?) is resolved by the existence of Fixnum::MAX. | |How: | | n3 = n1 + n2 | raise "unboxed" if n3 > Fixnum::MAX | |differs from: | | n3 = n1 + n2 | raise "unboxed" if !n3.instance_of?(Fixnum) | |? Just easier to read? For cases like the following: printf "integers %d .. %d are unboxed\n", Fixnum::MIN, Fixnum::MAX you don't have to create Fixnum instances. matz.