Strange behaviour on Windows
pbosetti opened this issue · 1 comments
pbosetti commented
Hi,
on my fork, I notice a trance behaviour on Windows. When I compile a .mrb file and then require (or load it), if the original source .rb file contains a function, whose name has exactly 10 characters (regardless the actual string), then loading the file has no effect, and no error is raised.
Note that this only happens on Windows. Mac and Linux do not present this issue. Additionally, if I run the same compiled .mrb compiled script with the standard mruby interpreter I get the correct behaviour. Can you replicate this?
Steps to replicate:
- create a
test.rb
script which defines the functiondef abcdefghij(); end
- compile it with mrbc
- launch the mirb interactive interpreter and
load "./test.mrb"
- test for existence of
abcdefghij()
: you should get an undefined method error.
More or less character in the function name do work. Exactly 10 characters and it doesn't.
mattn commented
I tried this on latest mruby&mruby-requrie.
But I can't reproduce it.
test.rb
def abcdefghij(); puts"foo"; end
C:\dev\mruby>bin\mrbc test.rb
t.rb
#! .\bin\mruby
load "./test.mrb"
abcdefghij
C:\dev\mruby>bin\mruby t.rb
foo