Skip to content

Commit f30227f

Browse files
committed
Omit el from Array.new
1 parent fb3990a commit f30227f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/fcm.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,7 @@ def credentials_error_msg(param)
304304

305305
def open_json_key_path?(path)
306306
valid_io_object = path.respond_to?(:open)
307-
if valid_io_object && File.file?(path)
308-
return true
309-
end
307+
return true if valid_io_object && File.file?(path)
310308

311309
max_path_len = 1024
312310
valid_path = path.is_a?(String) && path.length <= max_path_len

spec/fcm_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
end
2626

2727
let(:large_file_name) do
28-
Array.new(1021) {|el| "a"}.join("") + ".txt"
28+
Array.new(1021) { "a" }.join("") + ".txt"
2929
end
3030

3131
let(:creds_error) do

0 commit comments

Comments
 (0)