Aaron Patterson ✅ on Nostr: Ruby Quiz, what does this return? def foo(_ = 1, _:) _ end p foo(_: 2)
Ruby Quiz, what does this return?
def foo(_ = 1, _:)
_
end
p foo(_: 2)
Published at
2024-01-25 20:26:54Event JSON
{
"id": "c717e0b426661cf4ee560bb324830c3fb092c5bd57577d4a788fd95440bdca31",
"pubkey": "6eb5668f88b6adb4aa10e8c49f1210e8d352d1dd453f83427fea7a65802a4c61",
"created_at": 1706214414,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/users/tenderlove/statuses/111818467895380456",
"activitypub"
]
],
"content": "Ruby Quiz, what does this return?\n\ndef foo(_ = 1, _:)\n _\nend\n\np foo(_: 2)",
"sig": "586e513ff17f87ed3adf0e6f46c7ec96ebf09aca4cba05386e080452ecfd39c31f3238c7ef89a4852f15517f6e7d38ba6daad2bcabdda1bcca6fe6459c657bd6"
}