[MacRuby] #1016: Regular expression 'negative look-ahead' not working properly
MacRuby
ruby-noreply at macosforge.org
Wed Dec 1 21:09:34 PST 2010
#1016: Regular expression 'negative look-ahead' not working properly
----------------------------------+-----------------------------------------
Reporter: yasuimao@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
Comment(by watson1978@…):
I guess that this issue is cause of ICU 4.0 which installed in Mac OS X
10.6.[[BR]]
When I used the ICU 4.4.2, this issue does not appear.
Build the ICU
{{{
$ curl -O http://download.icu-project.org/files/icu4c/4.4.2/icu4c-
4_4_2-src.tgz
$ tar xvzf icu4c-4_4_2-src.tgz
$ cd icu/source/
$ ./runConfigureICU MacOSX --disable-renaming
$ make
$ sudo make install
}}}
Build the MacRuby
{{{
#!diff
diff --git a/rakelib/builder/options.rb b/rakelib/builder/options.rb
index b7d4980..271007a 100644
--- a/rakelib/builder/options.rb
+++ b/rakelib/builder/options.rb
@@ -154,7 +154,7 @@ class BuilderConfig
archflags = archs.map { |x| "-arch #{x}" }.join(' ')
@cflags = "-std=c99 -I. -I./include -fno-common -pipe -g -Wall
-fexceptions -O#{OPTZ_LEVEL} -Wno-deprecated-declarations -Werror
#{archflags}"
@cxxflags = "-I. -I./include -g -Wall -Wno-deprecated-declarations
-Werror #{archflags}"
- @ldflags = '-lpthread -ldl -lxml2 -lobjc -licucore -framework
Foundation'
+ @ldflags = '-lpthread -ldl -lxml2 -lobjc -L/usr/local/lib -licudata
-licui18n -licuio -licule -liculx -licutu -licuuc -framework Foundation'
@ldflags << " -lauto" if has_libauto
if opt.delete(:static)
@cflags << ' -DMACRUBY_STATIC'
}}}
{{{
$ RC_ARCHS=x86_64 rake jobs=2
}}}
Result
{{{
$ cat ~/tmp/r1.rb
text = "It is interesting. It is very interesting. It is very very
interesting. It is not interesting. It is not very interesting."
p text.scan(/it is(?:\ *(?!\bnot\b)\w+)?(?:\ *(?!\bnot\b)\w+)?
interesting/i)
$ DYLD_LIBRARY_PATH=. ./macruby ~/tmp/r1.rb
["It is interesting", "It is very interesting", "It is very very
interesting"]
$ ruby19 ~/tmp/r1.rb
["It is interesting", "It is very interesting", "It is very very
interesting"]
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/1016#comment:1>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list