~kameliya/rubyex

9fafd84d7cac7c0c04623ab2091788564df792d6 — Yuki Izumi 12 years ago bafa136
match will find it anywhere in the string, even
1 files changed, 2 insertions(+), 2 deletions(-)

M vm/rregexp.cpp
M vm/rregexp.cpp => vm/rregexp.cpp +2 -2
@@ 48,8 48,8 @@ RubyValue regexp_match(linked_ptr<Binding> &_b, RubyValue _self, const std::vect
  const std::string &str = _args[0].get_string();
  OnigRegion *mr = onig_region_new();

  int result = onig_match(	exp->reg, (UChar *)str.c_str(), (UChar *)str.c_str() + str.size(),
				(UChar *)str.c_str(), mr, 0);
  int result = onig_search(	exp->reg, (UChar *)str.c_str(), (UChar *)str.c_str() + str.size(),
				(UChar *)str.c_str(), (UChar *)str.c_str() + str.size(), mr, 0);
  if (result == ONIG_MISMATCH)
    return _b->environment.NIL;