Permalink
Browse files

string in beg and end variable will need ruby string

  • Loading branch information...
1 parent daf4c52 commit d3ed408d779c01f55c2f2a3d9680efa3619b4ddc @Watson1978 Watson1978 committed Nov 27, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 string.c
View
3 string.c
@@ -5197,6 +5197,9 @@ rstr_upto(VALUE str, SEL sel, int argc, VALUE *argv)
bool excl = RTEST(exclusive);
SEL succ_sel = sel_registerName("succ");
StringValue(end);
+ beg = (VALUE)str_need_string(beg);
+ end = (VALUE)str_need_string(end);
+
enc = str_must_have_compatible_encoding(RSTR(beg), RSTR(end));
ascii = (str_is_ruby_ascii_only(RSTR(beg)) && str_is_ruby_ascii_only(RSTR(end)));

0 comments on commit d3ed408

Please sign in to comment.