Forums

[Bug report] ruby version in build script

  1. in the gencredentials.rb file, line 17 need to be wrapped with ruby version judgement

    Since I can not post on trac system, so I post it here.

    --- a/WordPress/WordPressApi/gencredentials.rb
    +++ b/WordPress/WordPressApi/gencredentials.rb
    @@ -13,7 +13,11 @@ EOF
       length = secret.length
       key = Array.new(length) {|i| rand(256)}
       length.times do |i|
    +  if RUBY_VERSION < '1.9' then
         c = secret[i]
    +  else
    +    c = secret.getbyte(i)
    +  end
         c ^= key[i]
         printf("0x%02x", c)
         if (length > i + 1)

Topic Closed

This topic has been closed to new replies.


About this Topic

Tags