Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

mruby Notes Bug when Notes appeared in Chinese #628

Closed
TinyTinyFish opened this Issue · 3 comments

4 participants

TinyTinyFish beoran Yukihiro "Matz" Matsumoto syalon
TinyTinyFish

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

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

Yukihiro "Matz" Matsumoto
Owner

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

syalon

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)

~above

Yukihiro "Matz" Matsumoto matz closed this in 3be5bfb
cremno cremno referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.