Skip to content

Commit 070151f

Browse files
committed
Fix require and include call style
1 parent 1bc26d1 commit 070151f

37 files changed

+91
-90
lines changed

Rakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

3-
require("rake/extensiontask")
4-
require("bundler/gem_tasks")
3+
require "rake/extensiontask"
4+
require "bundler/gem_tasks"
55

66
gemspec = Gem::Specification.load("bootsnap.gemspec")
77
Rake::ExtensionTask.new do |ext|

bin/console

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env ruby
22
# frozen_string_literal: true
33

4-
require("bundler/setup")
5-
require("bootsnap")
4+
require "bundler/setup"
5+
require "bootsnap"
66

77
# You can add fixtures and/or initialization code here to make experimenting
88
# with your gem easier. You can also use a different console, if you like.
@@ -11,5 +11,5 @@ require("bootsnap")
1111
# require "pry"
1212
# Pry.start
1313

14-
require("irb")
14+
require "irb"
1515
IRB.start(__FILE__)

bootsnap.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
lib = File.expand_path("lib", __dir__)
44
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5-
require("bootsnap/version")
5+
require "bootsnap/version"
66

77
Gem::Specification.new do |spec|
88
spec.name = "bootsnap"

ext/bootsnap/extconf.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
require("mkmf")
3+
require "mkmf"
44

55
if %w[ruby truffleruby].include?(RUBY_ENGINE)
66
$CFLAGS << " -O3 "

lib/bootsnap.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# frozen_string_literal: true
22

3-
require_relative("bootsnap/version")
4-
require_relative("bootsnap/bundler")
5-
require_relative("bootsnap/load_path_cache")
6-
require_relative("bootsnap/compile_cache")
3+
require_relative "bootsnap/version"
4+
require_relative "bootsnap/bundler"
5+
require_relative "bootsnap/load_path_cache"
6+
require_relative "bootsnap/compile_cache"
77

88
module Bootsnap
99
InvalidConfiguration = Class.new(StandardError)

lib/bootsnap/bundler.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
module Bootsnap
4-
extend(self)
4+
extend self
55

66
def bundler?
77
return false unless defined?(::Bundler)

lib/bootsnap/compile_cache.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def UNCOMPILABLE.inspect
1212
def self.setup(cache_dir:, iseq:, yaml:, json:, readonly: false)
1313
if iseq
1414
if supported?
15-
require_relative("compile_cache/iseq")
15+
require_relative "compile_cache/iseq"
1616
Bootsnap::CompileCache::ISeq.install!(cache_dir)
1717
elsif $VERBOSE
1818
warn("[bootsnap/setup] bytecode caching is not supported on this implementation of Ruby")
@@ -21,7 +21,7 @@ def self.setup(cache_dir:, iseq:, yaml:, json:, readonly: false)
2121

2222
if yaml
2323
if supported?
24-
require_relative("compile_cache/yaml")
24+
require_relative "compile_cache/yaml"
2525
Bootsnap::CompileCache::YAML.install!(cache_dir)
2626
elsif $VERBOSE
2727
warn("[bootsnap/setup] YAML parsing caching is not supported on this implementation of Ruby")
@@ -30,7 +30,7 @@ def self.setup(cache_dir:, iseq:, yaml:, json:, readonly: false)
3030

3131
if json
3232
if supported?
33-
require_relative("compile_cache/json")
33+
require_relative "compile_cache/json"
3434
Bootsnap::CompileCache::JSON.install!(cache_dir)
3535
elsif $VERBOSE
3636
warn("[bootsnap/setup] JSON parsing caching is not supported on this implementation of Ruby")

lib/bootsnap/compile_cache/iseq.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

3-
require("bootsnap/bootsnap")
4-
require("zlib")
3+
require "bootsnap/bootsnap"
4+
require "zlib"
55

66
module Bootsnap
77
module CompileCache

lib/bootsnap/compile_cache/json.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
require("bootsnap/bootsnap")
3+
require "bootsnap/bootsnap"
44

55
module Bootsnap
66
module CompileCache
@@ -46,8 +46,8 @@ def install!(cache_dir)
4646
end
4747

4848
def init!
49-
require("json")
50-
require("msgpack")
49+
require "json"
50+
require "msgpack"
5151

5252
self.msgpack_factory = MessagePack::Factory.new
5353
self.supported_options = [:symbolize_names]

lib/bootsnap/compile_cache/yaml.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
require("bootsnap/bootsnap")
3+
require "bootsnap/bootsnap"
44

55
module Bootsnap
66
module CompileCache
@@ -55,9 +55,9 @@ def unpack(payload)
5555
end
5656

5757
def init!
58-
require("yaml")
59-
require("msgpack")
60-
require("date")
58+
require "yaml"
59+
require "msgpack"
60+
require "date"
6161

6262
@implementation = ::YAML::VERSION >= "4" ? Psych4 : Psych3
6363
if @implementation::Patch.method_defined?(:unsafe_load_file) && !::YAML.respond_to?(:unsafe_load_file)

0 commit comments

Comments
 (0)