diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-11-04 11:49:25 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-11-04 11:49:25 +0900 |
| commit | de2363a9f0c7d368ee9002f86931d124e644a243 (patch) | |
| tree | 2112928a80786a109ecac4b3ce200f45ac75e2cb /mrbgems/mruby-string-ext/src | |
| parent | 388d26d77027feaa3e107abf7209e2681868bbe6 (diff) | |
| parent | 625f9f6fa314872968632c5adbee7fb3823268b8 (diff) | |
| download | mruby-de2363a9f0c7d368ee9002f86931d124e644a243.tar.gz mruby-de2363a9f0c7d368ee9002f86931d124e644a243.zip | |
Merge branch 'mrb_without_float' of https://github.com/pandax381/mruby into pandax381-mrb_without_float
Diffstat (limited to 'mrbgems/mruby-string-ext/src')
| -rw-r--r-- | mrbgems/mruby-string-ext/src/string.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mrbgems/mruby-string-ext/src/string.c b/mrbgems/mruby-string-ext/src/string.c index 5195a7ba0..ddceb03ff 100644 --- a/mrbgems/mruby-string-ext/src/string.c +++ b/mrbgems/mruby-string-ext/src/string.c @@ -68,9 +68,11 @@ mrb_str_byteslice(mrb_state *mrb, mrb_value str) } return mrb_nil_value(); } +#ifndef MRB_WITHOUT_FLOAT case MRB_TT_FLOAT: a1 = mrb_fixnum_value((mrb_int)mrb_float(a1)); /* fall through */ +#endif case MRB_TT_FIXNUM: return mrb_str_substr(mrb, str, mrb_fixnum(a1), 1); default: |
