help wantedv1.3
描述
So, I was recently having some problems with require in Opal. In MRI, requiring files works like so:
main.rb
require "./file1.rb"
require "./file2.rb"
file1.rb
puts "file1"
file2.rb
puts "file2"
If you run the above code, you'll get file1 and file2 printed out. Also note that if you remove the ./ from the require statements, the above code will not work. But, in Opal (as of 0.7.1), using the ./ syntax does not work and requiring only works without using ./. In Opal 0.6.x, it seems to be that you can require with either ./ or without it. As far as I can tell, this problem seems to be an inconsistency between MRI and Opal.