mattn / mruby-onig-regexp

mrbgem of 鬼雲's Regular Expression
31 stars 36 forks source link

rake all test failed #17

Closed matsumotory closed 10 years ago

matsumotory commented 10 years ago

Hi, @mattn

rake all test was failed with mruby

Please see travis test.

https://travis-ci.org/matsumoto-r/mrbgem_test_ci/builds/22588120#L2034-L2040

Fail: $1 to $9
 - Assertion[1] Failed: Expected to be equal
    Expected: "aaab"
      Actual: nil
 - Assertion[2] Failed: Expected to be equal
    Expected: "b"
      Actual: nil
mattn commented 10 years ago

@take-cheeze Would you mind that removing this part? https://github.com/mattn/mruby-onig-regexp/blob/master/src/mruby_onig_regexp.c#L124-L127 Any objection?

take-cheeze commented 10 years ago

@mattn I think it's unrelated to this issue.

It removes global variables "$#{last_match.length}" to "$9". It's required to clear old match result.

I think mrb_gv_set failed because of other reason.

take-cheeze commented 10 years ago

Hmm, setting nil instead of removing should solve this. Maybe mrb_gv_remove has some bug since there was khash changes to mruby recently.

take-cheeze commented 10 years ago

BTW https://github.com/mruby/mruby/pull/2043 seems to fix this.

matsumotory commented 10 years ago

This issue was fixed by https://github.com/mruby/mruby/pull/2043, and mrbgem_test_ci is passed. Thanks!

ksss commented 10 years ago

I'm sorry for my bug!

take-cheeze commented 10 years ago

@ksss No problem. Thanks for the fix!