X7ROOT File Manager
Current Path:
/opt/alt/ruby27/share/gems/gems/irb-1.2.6/lib/irb
opt
/
alt
/
ruby27
/
share
/
gems
/
gems
/
irb-1.2.6
/
lib
/
irb
/
ðŸ“
..
ðŸ“
cmd
📄
color.rb
(7.74 KB)
📄
completion.rb
(9.46 KB)
📄
context.rb
(15.32 KB)
📄
easter-egg.rb
(3.61 KB)
ðŸ“
ext
📄
extend-command.rb
(10.13 KB)
📄
frame.rb
(1.97 KB)
📄
help.rb
(701 B)
📄
init.rb
(8.6 KB)
📄
input-method.rb
(8.96 KB)
📄
inspector.rb
(3.92 KB)
ðŸ“
lc
📄
locale.rb
(4.81 KB)
📄
magic-file.rb
(928 B)
📄
notifier.rb
(7.24 KB)
📄
output-method.rb
(2.44 KB)
📄
ruby-lex.rb
(16.6 KB)
📄
ruby_logo.aa
(2.32 KB)
📄
src_encoding.rb
(147 B)
📄
version.rb
(296 B)
📄
workspace.rb
(5.22 KB)
📄
ws-for-case-2.rb
(218 B)
📄
xmp.rb
(4.03 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