Skip to content

Commit

Permalink
Use require_relative where possible
Browse files Browse the repository at this point in the history
Also solves #1412
  • Loading branch information
eval committed Jan 3, 2024
1 parent f963113 commit 5632473
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', __FILE__)
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', __FILE__)

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(File.dirname(__FILE__), 'matchers', 'break_down_to')
require_relative 'matchers/break_down_to'

require 'mail'

Expand Down

0 comments on commit 5632473

Please sign in to comment.