Cool. I was going to apply your changes by hand, but if you're feeling spry, you're more than welcome to do it. I refactored the BytecodeConverter#convert method to use explicitly defined methods instead of a case statement (you'll know what I mean when you see it). I know that invoking a method instead of using a case statement will be more expensive, but I thought it might make the class a little more readable to keep all of the conversion methods in one place (at the bottom of the class). Unfortunately this forced me to alias the conversion methods. Making for stuff like:
def integer_to_bytecode(integer) #:nodoc#
DataTypeCodes::INTEGER + integer_to_hexadecimal(integer, 4)
end
alias bignum_to_bytecode integer_to_bytecode
alias fixnum_to_bytecode integer_to_bytecode
I'm interested to get your opinion on the refactoring. Is it worth it? Is it easier to understand this way?