diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-07-15 16:22:54 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-07-15 16:22:54 +0900 |
| commit | 50f56a2436154211a383d34828efa1db2073aeed (patch) | |
| tree | fc66aef1c53a6358070ab6a9f80fcc30a22c2ba8 /src/array.c | |
| parent | 72f7c51bc0bcef4096db8d57e7e5ab2a342e383f (diff) | |
| download | mruby-50f56a2436154211a383d34828efa1db2073aeed.tar.gz mruby-50f56a2436154211a383d34828efa1db2073aeed.zip | |
Array#join to accept only strings as sep
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 ec687bbf3..ed1c3f475 100644 --- a/src/array.c +++ b/src/array.c @@ -1006,7 +1006,7 @@ mrb_ary_join(mrb_state *mrb, mrb_value ary, mrb_value sep) /* * call-seq: - * ary.join(sep=nil) -> str + * ary.join(sep="") -> str * * Returns a string created by converting each element of the array to * a string, separated by <i>sep</i>. @@ -1020,7 +1020,7 @@ mrb_ary_join_m(mrb_state *mrb, mrb_value ary) { mrb_value sep = mrb_nil_value(); - mrb_get_args(mrb, "|o", &sep); + mrb_get_args(mrb, "|S", &sep); return mrb_ary_join(mrb, ary, sep); } |
