Permalink
Browse files

add missing new, thanks @rkh

  • Loading branch information...
1 parent 985a2a8 commit f660b00587fc8830acb3adec4a827761e4641fd8 @steveklabnik committed Sep 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 posts/2012-09-01-random-ruby-tricks--struct-new.md
@@ -26,7 +26,7 @@ Nobody uses it this way, though. Here's the way I first saw it used:
class Point < Struct.new(:x, :y)
end
-origin = Point(0,0)
+origin = Point.new(0,0)
```
Wait, what? Inherit...from an instance of something? Yep!

0 comments on commit f660b00

Please sign in to comment.