Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

mruby Notes Bug when Notes appeared in Chinese #628

heyuuu opened this Issue Dec 14, 2012 · 3 comments


None yet
4 participants

heyuuu commented Dec 14, 2012

bug是: mruby注释 如果跟在 语句 后面 ,然后注释里出现中文的话 就会报错(方法未定义的错误)

e.g.: p 'hello bug' # 这里出现中文的注释

bug is: mruby Notes with behind the statement, and comment appeared in Chinese will be an error (undefined method error)

eg: p 'hello bug' # Chinese comment

beoran commented Dec 14, 2012

Well, I think you must use UTF-8 encoding in the mrb source file.


matz commented Dec 15, 2012

Cannot reproduce here with UTF-8 and gbk.
What's your encoding? And show us your script and error message, please.

syalon commented Dec 15, 2012

I found, the error is in parser.y file, the 'nextc' function have a bug:

change the code 'c = _p->s++;' to c = (unsigned char)_p->s++;

add the (unsigned char)


@matz matz closed this in 3be5bfb Dec 17, 2012

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