diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-12-01 21:29:46 -0800 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-12-01 21:29:46 -0800 |
| commit | da8405a0f7ce7d4566afdba2243bd59a5498dfb1 (patch) | |
| tree | 9a69acf656c2d74b48c85129867fa249094b65fa /src/array.c | |
| parent | e981f0b45cb193e395ac446762b234e16d857712 (diff) | |
| parent | df780ae5e9cb12f527f01ce04137a1ad76c0b1c6 (diff) | |
| download | mruby-da8405a0f7ce7d4566afdba2243bd59a5498dfb1.tar.gz mruby-da8405a0f7ce7d4566afdba2243bd59a5498dfb1.zip | |
Merge pull request #1600 from take-cheeze/mrb_intern_lit
Proposal of mrb_intern_lit macro.
Diffstat (limited to 'src/array.c')
| -rw-r--r-- | src/array.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/array.c b/src/array.c index 3843339a1..41674bc54 100644 --- a/src/array.c +++ b/src/array.c @@ -309,7 +309,7 @@ mrb_ary_cmp(mrb_state *mrb, mrb_value ary1) a1 = RARRAY(ary1); a2 = RARRAY(ary2); if (a1->len == a2->len && a1->ptr == a2->ptr) return mrb_fixnum_value(0); else { - mrb_sym cmp = mrb_intern(mrb, "<=>", 3); + mrb_sym cmp = mrb_intern_lit(mrb, "<=>"); len = RARRAY_LEN(ary1); if (len > RARRAY_LEN(ary2)) { @@ -1070,7 +1070,7 @@ mrb_ary_equal(mrb_state *mrb, mrb_value ary1) if (mrb_obj_equal(mrb, ary1, ary2)) return mrb_true_value(); if (mrb_special_const_p(ary2)) return mrb_false_value(); if (!mrb_array_p(ary2)) { - if (!mrb_respond_to(mrb, ary2, mrb_intern(mrb, "to_ary", 6))) { + if (!mrb_respond_to(mrb, ary2, mrb_intern_lit(mrb, "to_ary"))) { return mrb_false_value(); } else { |
