Changes between Initial Version and Version 5 of Ticket #37740


Ignore:
Timestamp:
Jan 23, 2013, 1:04:43 AM (11 years ago)
Author:
ryandesign (Ryan Carsten Schmidt)
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #37740

    • Property Keywords haspatch added
    • Property Status changed from new to assigned
    • Property Cc johan.mattsson.m@… added
  • Ticket #37740 – Description

    initial v5  
    1818The question mark is 1.8.7, whose documentation [http://www.ruby-doc.org/core-1.8.7/IO.html#method-i-getbyte has a link in the sidebar for "getbyte"] but which takes you to the definition of "getc", which appears twice. Snow Leopard, Lion and Mountain Lion ship with ruby 1.8.7 and the port builds there, so it seems (and the [http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7/NEWS ruby 1.8.7 NEWS file] confirms) that in ruby 1.8.7 "getbyte" is a compatibility alias for "getc".
    1919
    20 Leopard has ruby 1.8.6 and Tiger has ruby 1.8.2. It seems the most correct thing to do, if you want to get a byte (which I assume is what the code in Source/JavaScriptCore/offlineasm/offsets.rb wants to do), is to check the ruby version, and use "getc" on ruby 1.8.x and earlier ande "getbyte" on ruby 1.9.x and later. I don't know enough ruby to be able to do that. For now, since all versions of OS X that MacPorts runs on today (10.4 through 10.8 inclusive) have ruby 1.8.x, we could get away with unconditionally changing "getbyte" to "getc".
     20Leopard has ruby 1.8.6 and Tiger has ruby 1.8.2. It seems the most correct thing to do, if you want to get a byte (which I assume is what the code in Source/JavaScriptCore/offlineasm/offsets.rb wants to do), is to check the ruby version, and use "getc" on ruby 1.8.x and earlier and "getbyte" on ruby 1.9.x and later. I don't know enough ruby to be able to do that. For now, since all versions of OS X that MacPorts runs on today (10.4 through 10.8 inclusive) have ruby 1.8.x, we could get away with unconditionally changing "getbyte" to "getc".
    2121
    22 I verified that changing "getbyte" to "getc" allows webkit-gtk @1.10.2 to build on Leopard.
     22I verified that changing "getbyte" to "getc" allows webkit-gtk @1.10.2 to build on Leopard i386.