From 9ce6e096370b150de4aa9e426726e1cc06f725b8 Mon Sep 17 00:00:00 2001 From: Yuta Kusuno <56626111+yutakusuno@users.noreply.github.com> Date: Tue, 20 Jun 2023 07:02:46 -0700 Subject: [PATCH] [ruby/reline] Omit constant under Struct (https://github.com/ruby/reline/pull/554) https://github.com/ruby/reline/commit/8761a11fa5 --- lib/reline.rb | 2 +- lib/reline/line_editor.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/reline.rb b/lib/reline.rb index fd70ffc9d0..ae98224653 100644 --- a/lib/reline.rb +++ b/lib/reline.rb @@ -17,7 +17,7 @@ module Reline class ConfigEncodingConversionError < StandardError; end - Key = Struct.new('Key', :char, :combined_char, :with_meta) do + Key = Struct.new(:char, :combined_char, :with_meta) do def match?(other) case other when Reline::Key diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index e8b83e2a6e..36375eee81 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -48,8 +48,8 @@ class Reline::LineEditor PERFECT_MATCH = :perfect_match end - CompletionJourneyData = Struct.new('CompletionJourneyData', :preposing, :postposing, :list, :pointer) - MenuInfo = Struct.new('MenuInfo', :target, :list) + CompletionJourneyData = Struct.new(:preposing, :postposing, :list, :pointer) + MenuInfo = Struct.new(:target, :list) PROMPT_LIST_CACHE_TIMEOUT = 0.5 MINIMUM_SCROLLBAR_HEIGHT = 1