4 ms·
My impression is that the convention is a ! suffix means both that 1) There's another, similar, method without the suffix. 2) The ! version has some side effe
by smitherfield 10y ago
My impression is that the convention is a ! suffix means both that
1) There's another, similar, method without the suffix.
2) The ! version has some side effect (usually mutating something or throwing an exception) that the non-! doesn't, which doesn't mean that the non-! has no side effects (`ApplicationRecord#save` and `#save!` both have side effects, but only `#save!` throws on failure).
—
Is there any idiomatic Ruby library where ! methods don't follow this convention?