From 4bfdb23ae60eac7af52dabfb38c75ea6c2c13fa8 Mon Sep 17 00:00:00 2001 From: tomoya ishida Date: Fri, 23 Feb 2024 21:32:47 +0900 Subject: [PATCH] Remove remaining `frozen_string_literal: false` in lib/ (#883) --- lib/irb.rb | 8 ++++---- lib/irb/inspector.rb | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/irb.rb b/lib/irb.rb index 09ea9256c..f5a7d24da 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # irb.rb - irb main module # by Keiju ISHITSUKA(keiju@ruby-lang.org) @@ -903,8 +903,8 @@ class Irb # parsed as a :method_add_arg and the output won't be suppressed PROMPT_MAIN_TRUNCATE_LENGTH = 32 - PROMPT_MAIN_TRUNCATE_OMISSION = '...'.freeze - CONTROL_CHARACTERS_PATTERN = "\x00-\x1F".freeze + PROMPT_MAIN_TRUNCATE_OMISSION = '...' + CONTROL_CHARACTERS_PATTERN = "\x00-\x1F" # Returns the current context of this irb session attr_reader :context @@ -1056,7 +1056,7 @@ def readmultiline return read_input(prompt) if @context.io.respond_to?(:check_termination) # nomultiline - code = '' + code = +'' line_offset = 0 loop do line = read_input(prompt) diff --git a/lib/irb/inspector.rb b/lib/irb/inspector.rb index 7bdd855b9..667087ccb 100644 --- a/lib/irb/inspector.rb +++ b/lib/irb/inspector.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true # # irb/inspector.rb - inspect methods # by Keiju ISHITSUKA(keiju@ruby-lang.org) @@ -113,7 +113,7 @@ def inspect_value(v) Color.colorize_code(v.inspect, colorable: Color.colorable? && Color.inspect_colorable?(v)) } Inspector.def_inspector([true, :pp, :pretty_inspect], proc{require_relative "color_printer"}){|v| - IRB::ColorPrinter.pp(v, '').chomp + IRB::ColorPrinter.pp(v, +'').chomp } Inspector.def_inspector([:yaml, :YAML], proc{require "yaml"}){|v| begin