X7ROOT File Manager
Current Path:
/opt/alt/ruby25/lib64/ruby/2.5.0/irb
opt
/
alt
/
ruby25
/
lib64
/
ruby
/
2.5.0
/
irb
/
ðŸ“
..
ðŸ“
cmd
📄
completion.rb
(6.49 KB)
📄
context.rb
(12.36 KB)
ðŸ“
ext
📄
extend-command.rb
(9.62 KB)
📄
frame.rb
(1.92 KB)
📄
help.rb
(705 B)
📄
init.rb
(7.58 KB)
📄
input-method.rb
(4.63 KB)
📄
inspector.rb
(3.61 KB)
ðŸ“
lc
📄
locale.rb
(4.64 KB)
📄
magic-file.rb
(928 B)
📄
notifier.rb
(7.18 KB)
📄
output-method.rb
(2.44 KB)
📄
ruby-lex.rb
(24.21 KB)
📄
ruby-token.rb
(7.37 KB)
📄
slex.rb
(6.83 KB)
📄
src_encoding.rb
(147 B)
📄
version.rb
(282 B)
📄
workspace.rb
(3.89 KB)
📄
ws-for-case-2.rb
(226 B)
📄
xmp.rb
(4.02 KB)
Editing: magic-file.rb
# frozen_string_literal: false module IRB class << (MagicFile = Object.new) # see parser_magic_comment in parse.y ENCODING_SPEC_RE = %r"coding\s*[=:]\s*([[:alnum:]\-_]+)" def open(path) io = File.open(path, 'rb') line = io.gets line = io.gets if line[0,2] == "#!" encoding = detect_encoding(line) internal_encoding = encoding encoding ||= IRB.default_src_encoding io.rewind io.set_encoding(encoding, internal_encoding) if block_given? begin return (yield io) ensure io.close end else return io end end private def detect_encoding(line) return unless line[0] == ?# line = line[1..-1] line = $1 if line[/-\*-\s*(.*?)\s*-*-$/] return nil unless ENCODING_SPEC_RE =~ line encoding = $1 return encoding.sub(/-(?:mac|dos|unix)/i, '') end end end
Upload File
Create Folder