mattn / mruby-onig-regexp

mrbgem of 鬼雲's Regular Expression
30 stars 34 forks source link

Match? bug #84

Closed proyb6 closed 6 years ago

proyb6 commented 6 years ago

Just discovered a bug when used in comparing against regex?

Did not match, should be match if /jpg/.match?(env["HTTP_ACCEPT"])

Working, match as expected if /jpg/.match(env["HTTP_ACCEPT"])

take-cheeze commented 6 years ago

You should paste what's in the env["HTTP_ACCEPT"] for test improvement.

proyb6 commented 6 years ago

Sorry, added env["HTTP_ACCEPT"] contains:

text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8

I've tested webp which could not match.

if /webp/.match?(env["HTTP_ACCEPT"])