Skip to content

Commit

Permalink
使用空格替代 tab
Browse files Browse the repository at this point in the history
  • Loading branch information
teddy-ma committed Sep 20, 2013
1 parent db853da commit 300404e
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions README-zhCN.md
Expand Up @@ -930,13 +930,12 @@

*`proc` 而不是 `Proc.new`

```Ruby
# bad
p = Proc.new { |n| puts n }
# good
p = proc { |n| puts n }
```
```Ruby
# bad
p = Proc.new { |n| puts n
# good
p = proc { |n| puts n }
```

*`proc.call()` 而不是 `proc[]``proc.()`

Expand Down Expand Up @@ -1029,7 +1028,7 @@
do_something if (1000...2000).include?(x)
# 好
do_something if x.between?(1000, 2000)
do_something if x.between?(1000, 2000)
```

Expand Down Expand Up @@ -1068,13 +1067,13 @@
* 使用 `Kernel#at_exit` 。永远不要用 `END` 区块。

````Ruby
# 差
# 差

END { puts 'Goodbye!' }
END { puts 'Goodbye!' }

# 好
# 好

at_exit { puts 'Goodbye!' }
at_exit { puts 'Goodbye!' }

```

Expand Down

0 comments on commit 300404e

Please sign in to comment.