Skip to content

Commit

Permalink
Use require_relative instead of require File.expand_path
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Mar 4, 2018
1 parent a23caca commit d78b963
Show file tree
Hide file tree
Showing 3,689 changed files with 6,083 additions and 6,083 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion command_line/dash_c_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../spec_helper', __FILE__)
require_relative '../spec_helper'

describe "The -c command line option" do
it "checks syntax in given file" do
Expand Down
2 changes: 1 addition & 1 deletion command_line/dash_d_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../spec_helper', __FILE__)
require_relative '../spec_helper'

describe "The -d command line option" do
before :each do
Expand Down
2 changes: 1 addition & 1 deletion command_line/dash_e_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../spec_helper', __FILE__)
require_relative '../spec_helper'

describe "The -e command line option" do
it "evaluates the given string" do
Expand Down
2 changes: 1 addition & 1 deletion command_line/dash_r_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../spec_helper', __FILE__)
require_relative '../spec_helper'

describe "The -r command line option" do
before :each do
Expand Down
2 changes: 1 addition & 1 deletion command_line/dash_s_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../spec_helper', __FILE__)
require_relative '../spec_helper'

describe "The -s command line option" do
describe "when using -- to stop parsing" do
Expand Down
2 changes: 1 addition & 1 deletion command_line/dash_upper_c_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../spec_helper', __FILE__)
require_relative '../spec_helper'

describe 'The -C command line option' do
before :all do
Expand Down
2 changes: 1 addition & 1 deletion command_line/dash_upper_i_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../spec_helper', __FILE__)
require_relative '../spec_helper'

describe "The -I command line option" do
before :each do
Expand Down
2 changes: 1 addition & 1 deletion command_line/dash_upper_s_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../spec_helper', __FILE__)
require_relative '../spec_helper'

describe 'The -S command line option' do
before :each do
Expand Down
4 changes: 2 additions & 2 deletions command_line/dash_upper_w_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../spec_helper', __FILE__)
require File.expand_path('../shared/verbose', __FILE__)
require_relative '../spec_helper'
require_relative 'shared/verbose'

describe "The -W command line option" do
before :each do
Expand Down
4 changes: 2 additions & 2 deletions command_line/dash_v_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../spec_helper', __FILE__)
require File.expand_path('../shared/verbose', __FILE__)
require_relative '../spec_helper'
require_relative 'shared/verbose'

describe "The -v command line option" do
it_behaves_like :command_line_verbose, "-v"
Expand Down
4 changes: 2 additions & 2 deletions command_line/dash_w_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../spec_helper', __FILE__)
require File.expand_path('../shared/verbose', __FILE__)
require_relative '../spec_helper'
require_relative 'shared/verbose'

describe "The -w command line option" do
it_behaves_like :command_line_verbose, "-w"
Expand Down
2 changes: 1 addition & 1 deletion command_line/error_message_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../spec_helper', __FILE__)
require_relative '../spec_helper'

describe "The error message caused by an exception" do
it "is not printed to stdout" do
Expand Down
2 changes: 1 addition & 1 deletion command_line/frozen_strings_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../spec_helper', __FILE__)
require_relative '../spec_helper'

ruby_version_is "2.3" do
describe "The --enable-frozen-string-literal flag causes string literals to" do
Expand Down
2 changes: 1 addition & 1 deletion command_line/rubyopt_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../spec_helper', __FILE__)
require_relative '../spec_helper'

describe "Processing RUBYOPT" do
before (:each) do
Expand Down
2 changes: 1 addition & 1 deletion command_line/syntax_error_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../spec_helper', __FILE__)
require_relative '../spec_helper'

describe "The interpreter" do
it "prints an error when given a file with invalid syntax" do
Expand Down
2 changes: 1 addition & 1 deletion core/argf/argf_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../../spec_helper', __FILE__)
require_relative '../../spec_helper'

describe "ARGF" do
it "is extended by the Enumerable module" do
Expand Down
2 changes: 1 addition & 1 deletion core/argf/argv_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../../spec_helper', __FILE__)
require_relative '../../spec_helper'

describe "ARGF.argv" do
before :each do
Expand Down
2 changes: 1 addition & 1 deletion core/argf/binmode_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../../spec_helper', __FILE__)
require_relative '../../spec_helper'

describe "ARGF.binmode" do
before :each do
Expand Down
4 changes: 2 additions & 2 deletions core/argf/bytes_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/each_byte', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/each_byte'

describe "ARGF.bytes" do
it_behaves_like :argf_each_byte, :bytes
Expand Down
4 changes: 2 additions & 2 deletions core/argf/chars_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/each_char', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/each_char'

describe "ARGF.chars" do
it_behaves_like :argf_each_char, :chars
Expand Down
2 changes: 1 addition & 1 deletion core/argf/close_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../../spec_helper', __FILE__)
require_relative '../../spec_helper'

describe "ARGF.close" do
before :each do
Expand Down
2 changes: 1 addition & 1 deletion core/argf/closed_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../../spec_helper', __FILE__)
require_relative '../../spec_helper'

describe "ARGF.closed?" do
before :each do
Expand Down
4 changes: 2 additions & 2 deletions core/argf/codepoints_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/each_codepoint', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/each_codepoint'

describe "ARGF.codepoints" do
it_behaves_like :argf_each_codepoint, :codepoints
Expand Down
4 changes: 2 additions & 2 deletions core/argf/each_byte_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/each_byte', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/each_byte'

describe "ARGF.each_byte" do
it_behaves_like :argf_each_byte, :each_byte
Expand Down
4 changes: 2 additions & 2 deletions core/argf/each_char_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/each_char', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/each_char'

describe "ARGF.each_char" do
it_behaves_like :argf_each_char, :each_char
Expand Down
4 changes: 2 additions & 2 deletions core/argf/each_codepoint_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/each_codepoint', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/each_codepoint'

describe "ARGF.each_codepoint" do
it_behaves_like :argf_each_codepoint, :each_codepoint
Expand Down
4 changes: 2 additions & 2 deletions core/argf/each_line_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/each_line', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/each_line'

describe "ARGF.each_line" do
it_behaves_like :argf_each_line, :each_line
Expand Down
4 changes: 2 additions & 2 deletions core/argf/each_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/each_line', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/each_line'

describe "ARGF.each" do
it_behaves_like :argf_each_line, :each
Expand Down
4 changes: 2 additions & 2 deletions core/argf/eof_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/eof', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/eof'

describe "ARGF.eof" do
it_behaves_like :argf_eof, :eof
Expand Down
2 changes: 1 addition & 1 deletion core/argf/file_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../../spec_helper', __FILE__)
require_relative '../../spec_helper'

describe "ARGF.file" do
before :each do
Expand Down
4 changes: 2 additions & 2 deletions core/argf/filename_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/filename', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/filename'

describe "ARGF.filename" do
it_behaves_like :argf_filename, :filename
Expand Down
4 changes: 2 additions & 2 deletions core/argf/fileno_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/fileno', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/fileno'

describe "ARGF.fileno" do
it_behaves_like :argf_fileno, :fileno
Expand Down
4 changes: 2 additions & 2 deletions core/argf/getc_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/getc', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/getc'

describe "ARGF.getc" do
it_behaves_like :argf_getc, :getc
Expand Down
4 changes: 2 additions & 2 deletions core/argf/gets_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/gets', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/gets'

describe "ARGF.gets" do
it_behaves_like :argf_gets, :gets
Expand Down
2 changes: 1 addition & 1 deletion core/argf/lineno_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../../spec_helper', __FILE__)
require_relative '../../spec_helper'

describe "ARGF.lineno" do
before :each do
Expand Down
4 changes: 2 additions & 2 deletions core/argf/lines_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/each_line', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/each_line'

describe "ARGF.lines" do
it_behaves_like :argf_each_line, :lines
Expand Down
4 changes: 2 additions & 2 deletions core/argf/path_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/filename', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/filename'

describe "ARGF.path" do
it_behaves_like :argf_filename, :path
Expand Down
4 changes: 2 additions & 2 deletions core/argf/pos_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/pos', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/pos'

describe "ARGF.pos" do
it_behaves_like :argf_pos, :pos
Expand Down
4 changes: 2 additions & 2 deletions core/argf/read_nonblock_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/read', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/read'

platform_is_not :windows do
describe 'ARGF.read_nonblock' do
Expand Down
4 changes: 2 additions & 2 deletions core/argf/read_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/read', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/read'

describe "ARGF.read" do
it_behaves_like :argf_read, :read
Expand Down
4 changes: 2 additions & 2 deletions core/argf/readchar_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/getc', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/getc'

describe "ARGF.getc" do
it_behaves_like :argf_getc, :readchar
Expand Down
4 changes: 2 additions & 2 deletions core/argf/readline_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/gets', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/gets'

describe "ARGF.readline" do
it_behaves_like :argf_gets, :readline
Expand Down
4 changes: 2 additions & 2 deletions core/argf/readlines_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/readlines', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/readlines'

describe "ARGF.readlines" do
it_behaves_like :argf_readlines, :readlines
Expand Down
4 changes: 2 additions & 2 deletions core/argf/readpartial_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/read', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/read'

describe "ARGF.readpartial" do
it_behaves_like :argf_read, :readpartial
Expand Down
2 changes: 1 addition & 1 deletion core/argf/rewind_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../../spec_helper', __FILE__)
require_relative '../../spec_helper'

describe "ARGF.rewind" do
before :each do
Expand Down
2 changes: 1 addition & 1 deletion core/argf/seek_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../../spec_helper', __FILE__)
require_relative '../../spec_helper'

describe "ARGF.seek" do
before :each do
Expand Down
2 changes: 1 addition & 1 deletion core/argf/set_encoding_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../../spec_helper', __FILE__)
require_relative '../../spec_helper'

describe "ARGF.set_encoding" do
before :each do
Expand Down
2 changes: 1 addition & 1 deletion core/argf/skip_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../../spec_helper', __FILE__)
require_relative '../../spec_helper'

describe "ARGF.skip" do
before :each do
Expand Down
4 changes: 2 additions & 2 deletions core/argf/tell_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/pos', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/pos'

describe "ARGF.tell" do
it_behaves_like :argf_pos, :tell
Expand Down
4 changes: 2 additions & 2 deletions core/argf/to_a_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/readlines', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/readlines'

describe "ARGF.to_a" do
it_behaves_like :argf_readlines, :to_a
Expand Down
4 changes: 2 additions & 2 deletions core/argf/to_i_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/fileno', __FILE__)
require_relative '../../spec_helper'
require_relative 'shared/fileno'

describe "ARGF.to_i" do
it_behaves_like :argf_fileno, :to_i
Expand Down
2 changes: 1 addition & 1 deletion core/argf/to_io_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../../spec_helper', __FILE__)
require_relative '../../spec_helper'

describe "ARGF.to_io" do
before :each do
Expand Down
2 changes: 1 addition & 1 deletion core/argf/to_s_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../../spec_helper', __FILE__)
require_relative '../../spec_helper'

describe "ARGF.to_s" do
before :each do
Expand Down
2 changes: 1 addition & 1 deletion core/array/allocate_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../../spec_helper', __FILE__)
require_relative '../../spec_helper'

describe "Array.allocate" do
it "returns an instance of Array" do
Expand Down
2 changes: 1 addition & 1 deletion core/array/any_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path('../../../spec_helper', __FILE__)
require_relative '../../spec_helper'

describe "Array#any?" do
describe 'with no block given (a default block of { |x| x } is implicit)' do
Expand Down
6 changes: 3 additions & 3 deletions core/array/append_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)
require File.expand_path('../shared/push', __FILE__)
require_relative '../../spec_helper'
require_relative 'fixtures/classes'
require_relative 'shared/push'

describe "Array#<<" do
it "pushes the object onto the end of the array" do
Expand Down
Loading

0 comments on commit d78b963

Please sign in to comment.