Skip to content

Instantly share code, notes, and snippets.

@Watson1978
Created April 20, 2012 16:29
Show Gist options
  • Select an option

  • Save Watson1978/2430137 to your computer and use it in GitHub Desktop.

Select an option

Save Watson1978/2430137 to your computer and use it in GitHub Desktop.
MacRuby : bug : regexp
p /\Aa{1}+\z/ =~ "a"
p /\Aa{1}+\z/ =~ "aa"
p /\Aa{1}+/ =~ "aa"
p /a{1}+\z/ =~ "aa"
@Watson1978

Copy link
Copy Markdown
Author

Expect

$ ruby19 test_regexp5.rb 
0
0
0
0

Result

$ macruby test_regexp5.rb
0
nil
0
1

@Watson1978

Copy link
Copy Markdown
Author

Hmm, it seems that ICU demo is same behavior.
http://demo.icu-project.org/icu-bin/redemo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment