Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
0x01f7 committed May 8, 2016
2 parents 32b4362 + 49ee417 commit 3e17460
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions README.md
Expand Up @@ -3310,11 +3310,11 @@ resource cleanup when possible.

```Ruby
timestamp = Time.now.to_i

# bad
timestamp.is_a? Fixnum
timestamp.is_a? Bignum

# good
timestamp.is_a? Integer
```
Expand All @@ -3337,18 +3337,6 @@ resource cleanup when possible.
email_with_name = format('%s <%s>', user.name, user.email)
```

* <a name="pad-string-interpolation"></a>
With interpolated expressions, there should be no padded-spacing inside the braces.
<sup>[[link](#pad-string-interpolation)]</sup>

```Ruby
# bad
"From: #{ user.first_name }, #{ user.last_name }"

# good
"From: #{user.first_name}, #{user.last_name}"
```

* <a name="consistent-string-literals"></a>
Adopt a consistent string literal quoting style. There are two popular
styles in the Ruby community, both of which are considered good - single
Expand Down

0 comments on commit 3e17460

Please sign in to comment.