Skip to content

Commit

Permalink
Merge pull request #1598 from mikel/issue/require-relative
Browse files Browse the repository at this point in the history
Use require_relative where possible
  • Loading branch information
eval committed Jan 3, 2024
2 parents a08e333 + 7e74b7e commit 15cd261
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mail.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require './lib/mail/version'
require_relative 'lib/mail/version'

Gem::Specification.new do |s|
s.name = "mail"
Expand Down
2 changes: 1 addition & 1 deletion rakelib/corpus.rake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require 'benchmark'
namespace :corpus do

task :load_mail do
require File.expand_path('../spec/environment', __dir__)
require_relative '../spec/environment'
require 'mail'
end

Expand Down
2 changes: 1 addition & 1 deletion rakelib/generate_tables
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Usage:
# ruby tasks/generate_tables
# The Unicode version downloaded is determined by the UNICODE_VERSION lib/mail/multibye/unicode.rb
require './lib/mail/multibyte/unicode'
require_relative '../lib/mail/multibyte/unicode'

require 'open-uri'
require 'tmpdir'
Expand Down
5 changes: 3 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# encoding: utf-8
# frozen_string_literal: true
require File.expand_path('environment', __dir__)

require_relative 'environment'

unless defined?(MAIL_ROOT)
$stderr.puts("Running Specs under Ruby Version #{RUBY_VERSION}")
Expand All @@ -17,7 +18,7 @@
end

require 'rspec'
require File.join(__dir__, 'matchers', 'break_down_to')
require_relative 'matchers/break_down_to'

require 'mail'

Expand Down

0 comments on commit 15cd261

Please sign in to comment.