回答編集履歴

1

wrap as function

2015/12/22 02:00

投稿

hello-world
hello-world

スコア1342

test CHANGED
@@ -4,9 +4,13 @@
4
4
 
5
5
  ```lang-ruby
6
6
 
7
- if (int_arg = arg).is_a? Integer
7
+ def foo(arg)
8
8
 
9
+ if (int_arg = arg).is_a? Integer
10
+
9
- something(int_arg)
11
+ something(int_arg)
12
+
13
+ end
10
14
 
11
15
  end
12
16