In regparse.c:
* Reduce coode duplication by merging the almost identical functions
create_sequence_node and create_alternate_node into a new function
create_node_from_array, adding a parameter that distinguishes between
creating a list and creating an alternative.
* Streamline variable/function naming. Unicode UAX #29 uses 'sequence', but
the regular expression library uses 'list' for the same concept. Keep
'sequence' in the ccmments that are taken from UAX #29, but use 'list'
in variable names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* unicode.c: Remove the arrays onigenc_unicode_GCB_ranges_GAZ,
onigenc_unicode_GCB_ranges_E_Base, and onigenc_unicode_GCB_ranges_Emoji,
because they are not needed anymore for Unicode 11.0.0.
* regparse.c: Remove external declarations for above arrays.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Mutexes may be held by threads which only exist in the parent
process, so their waitqueues may be populated with references
to other dead threads. We must reset them at fork.
I am a moron for introducing this bug :<
[ruby-core:90312] [Bug #15383]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/defines.h: introduce "COLDFUNC" function attribute
on several compilers for called unlikely functions.
Apply to rb_memerror, rb_warn and rb_bug.
A patch form methodmissing <lourens@bearmetal.eu>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.ac (check broken_backtrace code): fix decl. position
error because of `-Werror=declaration-after-statement`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
and allow to initialize again when obj.dup.
Suggested by Benoit Daloze. [ruby-core:88504] [Feature #15000]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- common.mk: Change Unicode version to 11.0.0, and Emoji version to 11.0
- test/ruby/enc/test_emoji_breaks.rb: update hard-coded Emoji version
- enc/unicode/11.0.0, enc/unicode/11.0.0/casefold.h, enc/unicode/name2ctype.h:
Add generated files. Files for Unicode 10.0.0 will be removed once we are
sure 11.0.0 works.
- lib/unicode_normalize/tables.rb: Updated table.
- regparse.c: Almost completely reimplement grapheme cluster detection in
function node_extended_grapheme_cluster().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Before this patch Array#all? was not implemented in Array class
and alternatively Enumerable#all? was used, while #any? has its
own method entry in Array class. Similarly, Array#none? and #one?
also lacks its own implementation.
This patch provides Array-specific implementations for above three
methods to enable faster method lookup.
[Fix GH-2041]
From: Koji Onishi <fursich0@gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Warning.warn does not add any newlines to the message argument.
[Bug #15379]
From: Olle Jonsson <olle.jonsson@gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
It is not needed since we have LIST_HEAD_INIT initializer in
mjit_worker.c
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.ac: disable using __builtin_setjmp to avoid errors when execution
globally jumps out of JITted code. Specify -std=gnu99 to JIT compilation
to avoid errors regarding the "restrict" keyword in the precompiled header.
Specify -shared in addition to -Wl,-G when building shared libraries
to make mjit_build_dir.so expose the MJIT_BUILD_DIR symbol. Use LDR_PRELOAD
to load mjit_build_dir.so.
* mjit_worker.c: do not specify -nodefaultlibs or -nostdlibs because on AIX
JITted code internally refers to the memcpy function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Cygwin/mingw linker should be able to link against shared library
itself. Mswin build sets -def:$(DEFFILE) option by the default.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
In test/ruby/test_regexp.rb and test/ruby/test_string.rb, change
some instances of COMBINING DIAERESIS (U+0308, above) to
COMBINING DIAERESIS BELOW (U+0324) to make it more easily visible
in test output, particularly in the context of double quotes
surrounding strings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e