Hacker News new | ask | show | jobs
by kitd 1435 days ago
Does anyone know if this uses ICU under the covers? Is that affected too?
1 comments

I don't believe that's the case, looking at the commit [0]

[0] https://github.com/tzinfo/tzinfo/commit/01bcca5de920093b52fb...

Interesting. The reason for a bug seems to be that ^ and $ in regexps match a boundary of any line, not boundaries of a string. This have already caused problems in the past, as far as I remember, but Ruby developers didn't change the behaviour of these characters.

So if you write a regexp like /^[0-9]$/, a string "Any characters\n12345\nAny characters" will match the regexp.

> Ruby developers didn't change the behaviour of these characters

because Ruby has \A and \Z to match the boundaries of a string