There is also a breaking-change required to avoid an ambiguity for drivers that support columns with Array values. db.query("SELECT ...", [1,2]) now means a single argument: [1, 2] , and db.query("SELECT ...", args: [1, 2]) means that two arguments are passed to the query.
Hmm. So something like this would now be a breaking-change? If I am reading it right
result = db.exec "UPDATE rpg_user_items set equipped = 0, slot_position = ? where user_id = ? and rpg_character_id = ? and itemid = ?", "#{x}x#{y}", client.user_id, client.selected_characterid, incoming_itemid
Aaah it’s when you run the spec using a line number! I see now.
Might be worth to rephrase as: Also when running a spec using a line number, if a line that ended someplace outside the it but inside a describe is specified, the whole describe will run.
The change from using / to // for doing integer division really caused havoc in my code.
The last subtlety was tracking down change from: a /= b to a = a // b, but found a //= b also works. Doing a /= b returns a float when it used to return an integer when both a and b were integers.
At least the compiler gave very helpful messages using: crystal file.cr --error-trace
Because I knew my code, once I knew what to look for it was straightforward to correct.
It might not be the case for people trying to use other people’s code.
This change really needs to be well documented with examples.
The fact that this was caught at compile time is actually amazing. If Ruby made this change you might overlook several cases of it until they make it to production.
To be completely accurate, I had to do a few more changes besides / to //,
like Time.now to Time.local, but the most serious ones involved operations
that used to create integer results that became floats.