Skip to content

Commit fd9be66

Browse files
committed
Merge pull request piotrmurach#191 from lukeasrodgers/fix-pp
Require `pp` if in debug mode.
2 parents 4db21ef + 6c7d3ec commit fd9be66

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

lib/github_api.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# encoding: utf-8
22

3+
require 'pp' if ENV['DEBUG']
34
require 'faraday'
45
require 'github_api/version'
56
require 'github_api/configuration'

lib/github_api/core_ext/ordered_hash.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def [](*args)
1515
if Hash == args[0]
1616
hsh.replace args[0]
1717
elsif (args.size % 2) != 0
18-
pp args
18+
pp args if ENV['DEBUG']
1919
raise ArgumentError, "odd number of elements for Hash"
2020
else
2121
0.step(args.size - 1, 2) do |a|

0 commit comments

Comments
 (0)