aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-05-29 17:58:18 -0700
committerJeremy Evans <code@jeremyevans.net>2019-05-29 18:03:21 -0700
commitd2ba80b5df7118383cbcfae934316310c6d81633 (patch)
tree777b55b5ca4b6748d8fca28abda467643b9aa621
parent5867e51e8311d1ed49457e946751cd0c06a306b8 (diff)
downloadruby-d2ba80b5df7118383cbcfae934316310c6d81633.tar.gz
Revert "Fix building with 1.8 BASERUBY"
This reverts commit 05bc14d81a1d7f6af826a92371aeff0c3fb2a67e. We have decided that the cost of reintroducing support for 1.8 BASERUBY outweighs the benefit. If you are still using 1.8 and want to build master/trunk, build and install the latest release, and use that as BASERUBY.
-rwxr-xr-xcommon.mk6
-rw-r--r--tool/colorize.rb2
-rw-r--r--tool/downloader.rb2
-rw-r--r--tool/generic_erb.rb5
4 files changed, 7 insertions, 8 deletions
diff --git a/common.mk b/common.mk
index db930426a3..74463651e1 100755
--- a/common.mk
+++ b/common.mk
@@ -785,9 +785,9 @@ extconf: $(PREP)
$(RBCONFIG): $(srcdir)/tool/mkconfig.rb config.status $(srcdir)/version.h
$(Q)$(BOOTSTRAPRUBY) -n \
- -e 'BEGIN{VERSION=ARGV.shift;MIS=ARGV.dup}' \
- -e 'END{abort "UNICODE version mismatch: #{MIS}" unless MIS.empty?}' \
- -e '(MIS.delete(ARGF.path); ARGF.close) if /ONIG_UNICODE_VERSION_STRING +"#{Regexp.quote(VERSION)}"/o' \
+ -e 'BEGIN{version=ARGV.shift;mis=ARGV.dup}' \
+ -e 'END{abort "UNICODE version mismatch: #{mis}" unless mis.empty?}' \
+ -e '(mis.delete(ARGF.path); ARGF.close) if /ONIG_UNICODE_VERSION_STRING +"#{Regexp.quote(version)}"/o' \
$(UNICODE_VERSION) $(UNICODE_DATA_HEADERS)
$(Q)$(BOOTSTRAPRUBY) $(srcdir)/tool/mkconfig.rb \
-arch=$(arch) -version=$(RUBY_PROGRAM_VERSION) \
diff --git a/tool/colorize.rb b/tool/colorize.rb
index 92076b9928..1cbbeef543 100644
--- a/tool/colorize.rb
+++ b/tool/colorize.rb
@@ -4,7 +4,7 @@ class Colorize
def initialize(color = nil)
@colors = @reset = nil
if color or (color == nil && STDOUT.tty?)
- if (/\A\e\[.*m\z/ =~ IO.popen("tput smso", "r", :err => IO::NULL, &:read) rescue nil)
+ if (/\A\e\[.*m\z/ =~ IO.popen("tput smso", "r", err: IO::NULL, &:read) rescue nil)
@beg = "\e["
@colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w+)=([^:\n]*)/)] : {}
@reset = "#{@beg}m"
diff --git a/tool/downloader.rb b/tool/downloader.rb
index 2436a4dae7..f42f9a0ef1 100644
--- a/tool/downloader.rb
+++ b/tool/downloader.rb
@@ -173,7 +173,7 @@ class Downloader
if cache_save
save_cache(cache, file, name)
end
- return file.respond_to?(:to_path) ? file.to_path : file.to_s
+ return file.to_path
end
if dryrun
puts "Download #{url} into #{file}"
diff --git a/tool/generic_erb.rb b/tool/generic_erb.rb
index 456a8e138b..3904b570c4 100644
--- a/tool/generic_erb.rb
+++ b/tool/generic_erb.rb
@@ -33,9 +33,8 @@ unchanged = color.pass("unchanged")
updated = color.fail("updated")
result = templates.map do |template|
- method = ERB.instance_method(:initialize)
- if method.respond_to?(:parameters) && method.parameters.assoc(:key) # Ruby 2.6+
- erb = ERB.new(File.read(template), :trim_mode => '%-')
+ if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+
+ erb = ERB.new(File.read(template), trim_mode: '%-')
else
erb = ERB.new(File.read(template), nil, '%-')
end