diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-04-07 12:07:48 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-04-08 20:42:14 +0900 |
commit | 3816157e5d955da422d717f278bd3d4551447348 (patch) | |
tree | c6ae9caa9626e7498a8ed0ce5e5b6aa5236ef908 /lib/irb | |
parent | d825e34962540d345eb3c5a70eb264b415e915a5 (diff) | |
download | ruby-3816157e5d955da422d717f278bd3d4551447348.tar.gz |
[ruby/irb] Ripper::Lexer::Elem#state is defined since Ruby 2.5
And the required ruby version is 2.5 or later.
https://github.com/ruby/irb/commit/ac496d4c78
Diffstat (limited to 'lib/irb')
-rw-r--r-- | lib/irb/color.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/irb/color.rb b/lib/irb/color.rb index cfbb3cc668..fce4d53191 100644 --- a/lib/irb/color.rb +++ b/lib/irb/color.rb @@ -77,7 +77,7 @@ module IRB # :nodoc: class << self def colorable? - $stdout.tty? && supported? && (/mswin|mingw/ =~ RUBY_PLATFORM || (ENV.key?('TERM') && ENV['TERM'] != 'dumb')) + $stdout.tty? && (/mswin|mingw/ =~ RUBY_PLATFORM || (ENV.key?('TERM') && ENV['TERM'] != 'dumb')) end def inspect_colorable?(obj, seen: {}.compare_by_identity) @@ -161,11 +161,6 @@ module IRB # :nodoc: seen.delete(obj) end - def supported? - return @supported if defined?(@supported) - @supported = Ripper::Lexer::Elem.method_defined?(:state) - end - def scan(code, allow_last_error:) pos = [1, 0] |