forked from mruby/mruby
-
Notifications
You must be signed in to change notification settings - Fork 4
Difference from CRuby
Tomoyuki Sahara edited this page Feb 12, 2014
·
6 revisions
-
defined?
operator- Workaround: can be replaced with
Module.const_defined?
etc. - https://github.com/mruby/mruby/issues/1696
- Workaround: can be replaced with
- Bignum
- no Bignum class
- a Fixnum value cannot be smaller than
MRB_INT_MIN
nor larger thanMRB_INT_MAX
. - Wordaround: none, or use Float if you don't need exact numbers
- A lot of standard libraries
- Wordaround: try mrbgems
- There is a list of known mrbgems: https://github.com/mruby/mruby/wiki/Related-Projects
- Or managemengt tool written in Ruby: https://github.com/bovi/mgem-list
- Integer#/ always returns a Float value
- CRuby returns an Integer value (with rounding)
- Wordaround: appy Float#round or other rounding methods
- https://github.com/mruby/mruby/issues/1431