Skip to content

Commit 9912dec

Browse files
committedFeb 24, 2015
Cleanup stdlib/pp
1 parent 33c5091 commit 9912dec

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed
 

‎stdlib/pp.rb

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
module Kernel
2-
def pretty_inspect; inspect; end
2+
def pretty_inspect
3+
inspect
4+
end
35

4-
if `(typeof console === "undefined" || typeof console.log === "undefined")`
5-
alias :pp :p
6+
if `(typeof(console) === "undefined" || typeof(console.log) === "undefined")`
7+
alias pp p
68
else
7-
def pp *args
8-
args.each { |obj| `console.log(obj);` }
9+
def pp(*args)
10+
args.each { |obj| `console.log(obj)` }
911
args.length <= 1 ? args[0] : args
1012
end
1113
end

0 commit comments

Comments
 (0)
Please sign in to comment.