A Ruby Class’s default ‘initialize’ method takes zero or any number or arguments depending on the version of Ruby you use.
Given the Foo class:
class Foo end
And then attempting to instantiate an instance of Foo with arguments like so:
You get an invalid number of arguments error in 1.8.7 and 1.9.3.
However, 1.9.2 and 1.9.1 will just accept any number of arguments.
Ruby spec documents this behavior:
It appears that this difference between versions was introduced as a feature in 1.9.2 and back ported to 1.9.1 and then reverted in 1.9.3. Perhaps the reversion should be back ported now?
Does anyone know of an API that provides a sales tax lookup service?