diff options
author | Stan Lo <[email protected]> | 2023-04-28 18:20:16 +0100 |
---|---|---|
committer | git <[email protected]> | 2023-04-28 17:20:20 +0000 |
commit | e9930b51b205bd4e577b3787e8d8e7db8eebc237 (patch) | |
tree | 186e1fe2f1d9f8f30c51237555c55c3deaa9b4ec /lib/irb/input-method.rb | |
parent | d4dc149c3c4cc01098b5af67decbcba6d370bbee (diff) |
[ruby/irb] Retire magic-file.rb
(https://github.com/ruby/irb/pull/574)
`MagicFile` was introduced around v0.9.6, which was like 14~15 years ago.
It was needed because back then we needed to read a file's magic comment
to determine the encoding of it, and read it with that encoding.
Commit: 3ee79e89
But now we expect files to be encoded in UTF-8 and don't specify encoding
through magic comments anymore, `MagicFile` can be retired.
Diffstat (limited to 'lib/irb/input-method.rb')
-rw-r--r-- | lib/irb/input-method.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb index bc61805ebb..ed5c53c385 100644 --- a/lib/irb/input-method.rb +++ b/lib/irb/input-method.rb @@ -5,7 +5,6 @@ # require_relative 'src_encoding' -require_relative 'magic-file' require_relative 'completion' require 'io/console' require 'reline' @@ -132,7 +131,7 @@ module IRB # Creates a new input method object def initialize(file) super - @io = file.is_a?(IO) ? file : IRB::MagicFile.open(file) + @io = file.is_a?(IO) ? file : File.open(file) @external_encoding = @io.external_encoding end # The file name of this input method, usually given during initialization. |