mroach on Nostr: Ran across some shit in #Ruby that gives me JavaScript vibes. If you divide by 0 as ...
Ran across some shit in #Ruby that gives me JavaScript vibes.
If you divide by 0 as an integer, it raises a `ZeroDivisionError`. If you divide by 0.0 as a Float or BigDecimal, you get `Infinity` as a result.
Published at
2024-03-27 12:12:28Event JSON
{
"id": "9f74878d8348ddab782249efc8e3d9d841abced1f40afec3c854a38d08387db9",
"pubkey": "96f557b76a864ecf0c256d5a55f38e1fbf9a15b1f7d1cc192c0f07859ea4e990",
"created_at": 1711541548,
"kind": 1,
"tags": [
[
"t",
"Ruby"
],
[
"proxy",
"https://mas.to/users/mroach/statuses/112167586913556237",
"activitypub"
]
],
"content": "Ran across some shit in #Ruby that gives me JavaScript vibes.\n\nIf you divide by 0 as an integer, it raises a `ZeroDivisionError`. If you divide by 0.0 as a Float or BigDecimal, you get `Infinity` as a result.\n\nhttps://media.mas.to/media_attachments/files/112/167/581/272/002/569/original/ce797731db860c53.png",
"sig": "628e0576e433071f1ddb709ba9dfae6ff22b831158a6de749cee4eeebf5ccef857d598aa10241ee290b8faf34bd57f19deb8d820fae1ea93abda91a2305e77e9"
}