ptus 1.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -2
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
==ptus
|
2
2
|
Author: Nat Ritmeyer (http://www.natontesting.com)
|
3
3
|
===Intro
|
4
|
-
I remember one colleague
|
4
|
+
I remember one colleague who used to often type 'ptus' into his ruby code instead of 'puts'. Every time he made the mistake, he would explode in a rage with himself when the code ran and failed: "Just because of a stupid [expletive] typo!!!". He could never break the habit, so we wrote a monkey patch that would allow his code to run, but the line of code containing the offending typo would be flagged. "Everyone's a winner": his code would run, his typo would be flagged, and since the monkey patch lived on his machine and never got checked in (svn ignore!), 'ptus' didn't creep into the codebase.
|
5
5
|
|
6
6
|
A few years on, I now find myself typing 'ptus' enough for it to begin to irritate me. Age related, maybe. So I've rewritten the code and bundled it up properly into this gem.
|
7
7
|
|
@@ -24,7 +24,7 @@ Simply require the gem, and make as many 'ptus' typos as you want!
|
|
24
24
|
Writing code like the above will no longer kill your app at runtime; instead it will run just fine, but you'll get the following warning:
|
25
25
|
|
26
26
|
This is right
|
27
|
-
Change 'ptus' to 'puts' here: my_file.rb:
|
27
|
+
Change 'ptus' to 'puts' here: my_file.rb:5:in `<main>'
|
28
28
|
This is wrong
|
29
29
|
This is also right
|
30
30
|
|