Comments (7)
I don't repro.
from mruby-onig-regexp.
Seems not resolved.
$ mruby -e 'p "あいうえお".split(//)'
Assertion failed: (((((const mrb_value*)((struct RArray*)((result).value.p))->ptr)[i - 1]).tt == MRB_TT_STRING)), function string_split, file /Users/ksss/src/github.com/ksss/mruby-onig-regexp/src/mruby_onig_regexp.c, line 863.
[1] 57589 abort ./build/host/bin/mruby -e 'p "あいうえお".split(//)'
from mruby-onig-regexp.
Hmm, I don't repro.
["\343\201\202", "\343\201\204", "\343\201\206", "\343\201\210", "\343\201\212"]
from mruby-onig-regexp.
And line 863 is not operatable code.
if (limit == 0) { // remove empty trailing elements
from mruby-onig-regexp.
Sorry, I tried to rebuild it.
$ uname -v
Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64
$ clang -v
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ pwd
/Users/ksss/src/github.com/ksss/mruby
$ git rev-parse HEAD
3703aed7ab7c056ef7a58fd8d25b84b59f715dad
$ pkg-config --list-all | grep onig
$ cat build_config.rb
MRuby::Build.new do |conf|
toolchain :gcc
enable_debug
conf.gembox 'default'
conf.gem mgem: "mruby-onig-regexp"
end
$ git diff include
diff --git a/include/mrbconf.h b/include/mrbconf.h
index 4796919c..1eecb3e6 100644
--- a/include/mrbconf.h
+++ b/include/mrbconf.h
@@ -44,7 +44,7 @@
//#define MRB_WORD_BOXING
/* string class to handle UTF-8 encoding */
-//#define MRB_UTF8_STRING
+#define MRB_UTF8_STRING
/* argv max size in mrb_funcall */
//#define MRB_FUNCALL_ARGC_MAX 16
$ rm -fr build && rake clean && rake
# ...snip...
$ ./build/host/bin/mruby -e 'p "あいうえお".split(//)'
Assertion failed: (((((const mrb_value*)((struct RArray*)((result).value.p))->ptr)[i - 1]).tt == MRB_TT_STRING)), function string_split, file /Users/ksss/src/github.com/ksss/mruby-onig-regexp/src/mruby_onig_regexp.c, line 866.
[2] 66618 abort ./build/host/bin/mruby -e 'p "あいうえお".split(//)'
$ sed -n '866p' /Users/ksss/src/github.com/ksss/mruby-onig-regexp/src/mruby_onig_regexp.c
mrb_assert(mrb_string_p(RARRAY_PTR(result)[i - 1]));
$ cd build/mrbgems/mruby-onig-regexp; git rev-parse HEAD; cd ../../../
17e8663da6d597f85c75aeda2737971f2c756fa3
MRB_UTF8_STRING
is an important point.
from mruby-onig-regexp.
should be fixed.
from mruby-onig-regexp.
I was able to confirm the fix.
Thanks!
from mruby-onig-regexp.
Related Issues (20)
- How to cross compile this gem? HOT 7
- Compilation failed on Visual Studio 2019
- Can not cross complie for x86_64-w64-mingw32 on Mac HOT 8
- test fails when MRB_UTF8_STRING is defined HOT 4
- No way to explicitly use the included libonig instead of what is installed on the host system
- ld: symbol(s) not found for architecture x86_64 HOT 3
- Slice on empty string
- gem description maybe is "鬼車", not "鬼雲" ? HOT 1
- string size too big (ArgumentError)
- infinite loop when empty regexp HOT 2
- Doesn't freak out when replacing `^` HOT 2
- /./ should match to latin-1 letter when MRB_UTF8_STRING is not defined.
- build with bundled onigmo fails when c++ API is enabled HOT 3
- Problems finding oniguruma.h HOT 2
- Support `Regexp#match?` HOT 8
- Freeze regex variable HOT 1
- Match? bug HOT 2
- Supporting non-word char in group name HOT 1
- slice! does not work with Regexp HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mruby-onig-regexp.