Skip to content

Commit 1cfffe6

Browse files
committed
Use JSON.parse instead o JSON.load_file for Ruby 2.7 compatbility
1 parent 3624eea commit 1cfffe6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rubocop.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def self.request(request_class, path, params = nil)
6363

6464
# Figure out which ruby files have changed and run Rubocop on them
6565

66-
github_event = JSON.load_file(ENV.fetch("GITHUB_EVENT_PATH"))
66+
github_event = JSON.parse(File.read(ENV.fetch("GITHUB_EVENT_PATH")))
6767
pr_number = github_event.fetch("pull_request").fetch("number")
6868
owner_and_repository = ENV.fetch("GITHUB_REPOSITORY")
6969

0 commit comments

Comments
 (0)