[MacRuby-devel] Building MacRuby r2765 with llvm r82747 failed on core duo macbook, Leopard

Laurent Sansonetti lsansonetti at apple.com
Sun Oct 11 22:01:06 PDT 2009


On Oct 11, 2009, at 7:42 PM, Vincent Isambart wrote:
>> At the line around 100 of bin/rubyc:
>>
>>   init_func = "MREP_#{File.read(path).hash}"
>>
>> I extracted this line and execute it with -e option
>>
>> $ ./miniruby -I. -I./lib -e "p File.read('rbconfig.rb').hash"
>> -107041289
>>
>> I suppose that String#hash method will return an integer, that could
>> be nagative value. I don't know why on other environments
>> the method return positive value everytime...
>
> Laurent, wouldn't it be better to use something like a SHA1:
> require 'digest/sha1'
> init_func = "MREP_#{Digest::SHA1.hexdigest(File.read(path))}"

miniruby cannot load C extensions, so this isn't an option.

Laurent


More information about the MacRuby-devel mailing list