Ruby Syntax Quirks

Discussions center on Ruby's flexible, surprising, and sometimes confusing syntax, idioms, features, and behaviors, including debates on whether they are elegant or problematic.

📉 Falling 0.5x Programming Languages
3,576
Comments
20
Years Active
5
Top Authors
#8323
Topic ID

Activity Over Time

2007
18
2008
105
2009
182
2010
239
2011
251
2012
263
2013
336
2014
168
2015
195
2016
148
2017
143
2018
108
2019
130
2020
176
2021
187
2022
222
2023
261
2024
217
2025
220
2026
7

Keywords

e.g Person.find logger.log GC IMO HN Proc.new Kernel.send Foo.new x.call ruby proc class puts hash nil code atom def lambda

Sample Comments

chatman • Mar 13, 2015 • View on HN

Just comes to show how careless Ruby guys were while building this.

sn41 • Dec 2, 2022 • View on HN

Ruby has this. Can be surprising to read code ... "Wait.. What? Oh ok."

optimuspaul • May 19, 2017 • View on HN

yeah, ruby allows some odd stuff for sure.

breatheoften • May 2, 2020 • View on HN

does ruby do anything like this? i'm new to ruby and could imagine something like this biting me ...

ludamad • May 9, 2014 • View on HN

It's fine, Ruby takes the more sensible semantics here (IMO)

rbanffy • Feb 3, 2010 • View on HN

Ruby always confuses me with this flexible syntax...

tenderlove • Nov 24, 2009 • View on HN

To make ruby programmers feel uneasy. ;-)

MrBra • Oct 8, 2013 • View on HN

Can you give an example of something in Ruby that makes your head hurt because you don't know what's going on under the hood?

miohtama • Jul 17, 2014 • View on HN

Looks like Ruby doesn't have ugly hacks.

robertoandred • Feb 4, 2022 • View on HN

Is there a such thing as "the ruby way"?