diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-12-17 20:10:08 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-12-17 20:10:08 +0900 |
| commit | 545c5eecc0e671e51bbff201a6a5e74d0c692066 (patch) | |
| tree | d7b084071134f78d9a5515e316faeea775581407 /src | |
| parent | 5b203ead1e5f642af7bbb2c1b4d28cf4c5737633 (diff) | |
| parent | 4319eaaa45ce26e73cfac6e1c8b724e35680577b (diff) | |
| download | mruby-545c5eecc0e671e51bbff201a6a5e74d0c692066.tar.gz mruby-545c5eecc0e671e51bbff201a6a5e74d0c692066.zip | |
Merge branch 'h2so5-string-nil-index'
Diffstat (limited to 'src')
| -rw-r--r-- | src/string.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/string.c b/src/string.c index 1c54ffa72..aa26b261c 100644 --- a/src/string.c +++ b/src/string.c @@ -781,6 +781,10 @@ num_index: } } default: + indx = mrb_Integer(mrb, indx); + if (mrb_nil_p(indx)) { + mrb_raise(mrb, E_TYPE_ERROR, "can't convert to Fixnum"); + } idx = mrb_fixnum(indx); goto num_index; } |
