rio 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +1 -1
- data/README +1 -1
- data/lib/rio.rb +5 -4
- data/lib/rio/abstract_method.rb +1 -1
- data/lib/rio/alturi.rb +10 -69
- data/lib/rio/alturi/algorithm.rb +1 -18
- data/lib/rio/alturi/escape.rb +0 -4
- data/lib/rio/alturi/parse.rb +0 -29
- data/lib/rio/alturi/path_parts.rb +0 -2
- data/lib/rio/alturi/uri_parts.rb +3 -32
- data/lib/rio/argv.rb +1 -1
- data/lib/rio/arraynge.rb +1 -3
- data/lib/rio/arycopy.rb +1 -1
- data/lib/rio/assert.rb +31 -47
- data/lib/rio/base.rb +1 -1
- data/lib/rio/callstr.rb +1 -1
- data/lib/rio/const.rb +1 -1
- data/lib/rio/construct.rb +1 -1
- data/lib/rio/constructor.rb +1 -1
- data/lib/rio/context.rb +8 -4
- data/lib/rio/context/autoclose.rb +1 -1
- data/lib/rio/context/binmode.rb +1 -7
- data/lib/rio/context/copying.rb +1 -1
- data/lib/rio/context/cxx.rb +1 -1
- data/lib/rio/context/dir.rb +1 -1
- data/lib/rio/context/encoding.rb +1 -2
- data/lib/rio/context/gzip.rb +1 -1
- data/lib/rio/context/methods.rb +1 -6
- data/lib/rio/context/skip.rb +1 -1
- data/lib/rio/context/stream.rb +1 -8
- data/lib/rio/cp.rb +1 -1
- data/lib/rio/cxuri.rb +11 -7
- data/lib/rio/dbg/trace_states.rb +0 -2
- data/lib/rio/def.rb +1 -1
- data/lib/rio/dir.rb +2 -2
- data/lib/rio/doc.rb +1 -1
- data/lib/rio/entrysel.rb +6 -6
- data/lib/rio/exception.rb +1 -1
- data/lib/rio/exception/copy.rb +1 -1
- data/lib/rio/exception/notimplemented.rb +1 -1
- data/lib/rio/exception/notsupported.rb +1 -1
- data/lib/rio/exception/open.rb +1 -12
- data/lib/rio/exception/state.rb +1 -1
- data/lib/rio/ext.rb +1 -8
- data/lib/rio/ext/csv.rb +1 -25
- data/lib/rio/ext/csv/csv-legacy.rb +1 -49
- data/lib/rio/ext/csv/csv.rb +1 -24
- data/lib/rio/ext/csv/filter.rb +1 -19
- data/lib/rio/ext/if.rb +1 -1
- data/lib/rio/ext/mp3info.rb +6 -5
- data/lib/rio/ext/splitlines.rb +1 -23
- data/lib/rio/ext/yaml.rb +1 -16
- data/lib/rio/ext/yaml/doc.rb +1 -6
- data/lib/rio/ext/yaml/tie.rb +4 -7
- data/lib/rio/ext/zipfile.rb +1 -56
- data/lib/rio/ext/zipfile/fs.rb +1 -30
- data/lib/rio/ext/zipfile/rl.rb +1 -128
- data/lib/rio/ext/zipfile/rootdir.rb +1 -30
- data/lib/rio/ext/zipfile/state.rb +1 -105
- data/lib/rio/ext/zipfile/wrap.rb +1 -86
- data/lib/rio/factory.rb +2 -100
- data/lib/rio/fibpipe.rb +0 -98
- data/lib/rio/file.rb +1 -12
- data/lib/rio/filter.rb +1 -1
- data/lib/rio/filter/closeoneof.rb +1 -10
- data/lib/rio/filter/gzip.rb +1 -16
- data/lib/rio/fs.rb +75 -92
- data/lib/rio/fs/base.rb +1 -1
- data/lib/rio/fs/impl.rb +1 -1
- data/lib/rio/fs/native.rb +1 -1
- data/lib/rio/fs/stream.rb +1 -1
- data/lib/rio/fs/url.rb +1 -1
- data/lib/rio/ftp/conncache.rb +1 -15
- data/lib/rio/ftp/dir.rb +1 -2
- data/lib/rio/ftp/fs.rb +1 -13
- data/lib/rio/fwd.rb +31 -8
- data/lib/rio/grande.rb +2 -4
- data/lib/rio/handle.rb +1 -1
- data/lib/rio/if.rb +1 -7
- data/lib/rio/if/basic.rb +1 -5
- data/lib/rio/if/csv.rb +1 -1
- data/lib/rio/if/dir.rb +1 -1
- data/lib/rio/if/file.rb +1 -1
- data/lib/rio/if/fileordir.rb +1 -1
- data/lib/rio/if/grande.rb +1 -1
- data/lib/rio/if/grande_entry.rb +1 -1
- data/lib/rio/if/grande_stream.rb +1 -1
- data/lib/rio/if/internal.rb +1 -1
- data/lib/rio/if/path.rb +1 -1
- data/lib/rio/if/rubyio.rb +1 -1
- data/lib/rio/if/string.rb +1 -1
- data/lib/rio/if/temp.rb +1 -1
- data/lib/rio/if/test.rb +1 -1
- data/lib/rio/if/yaml.rb +1 -1
- data/lib/rio/ioh.rb +42 -24
- data/lib/rio/iomode.rb +3 -3
- data/lib/rio/ios/fail.rb +1 -1
- data/lib/rio/ios/generic.rb +1 -1
- data/lib/rio/ios/mode.rb +1 -1
- data/lib/rio/ios/null.rb +1 -13
- data/lib/rio/iowrap.rb +1 -14
- data/lib/rio/kernel.rb +1 -2
- data/lib/rio/local.rb +1 -13
- data/lib/rio/match.rb +1 -2
- data/lib/rio/matchrecord.rb +5 -34
- data/lib/rio/no_warn.rb +1 -1
- data/lib/rio/nullio.rb +1 -1
- data/lib/rio/open3.rb +1 -10
- data/lib/rio/ops.rb +1 -1
- data/lib/rio/ops/construct.rb +1 -1
- data/lib/rio/ops/create.rb +1 -3
- data/lib/rio/ops/dir.rb +4 -46
- data/lib/rio/ops/either.rb +1 -3
- data/lib/rio/ops/file.rb +1 -25
- data/lib/rio/ops/path.rb +1 -18
- data/lib/rio/ops/stream.rb +4 -5
- data/lib/rio/ops/stream/input.rb +1 -10
- data/lib/rio/ops/stream/output.rb +1 -3
- data/lib/rio/ops/stream/read.rb +1 -1
- data/lib/rio/ops/stream/write.rb +1 -1
- data/lib/rio/ops/symlink.rb +1 -10
- data/lib/rio/path.rb +1 -4
- data/lib/rio/path/reset.rb +1 -6
- data/lib/rio/piper.rb +1 -4
- data/lib/rio/piper/cp.rb +1 -16
- data/lib/rio/prompt.rb +1 -1
- data/lib/rio/rectype.rb +1 -4
- data/lib/rio/rl/base.rb +1 -14
- data/lib/rio/rl/builder.rb +1 -12
- data/lib/rio/rl/chmap.rb +1 -11
- data/lib/rio/rl/fs2url.rb +1 -8
- data/lib/rio/rl/ioi.rb +1 -2
- data/lib/rio/rl/path.rb +1 -20
- data/lib/rio/rl/pathmethods.rb +1 -3
- data/lib/rio/rl/uri.rb +1 -11
- data/lib/rio/rl/withpath.rb +2 -30
- data/lib/rio/rrl/base.rb +1 -6
- data/lib/rio/rrl/builder.rb +2 -8
- data/lib/rio/rrl/chmap.rb +1 -11
- data/lib/rio/rrl/ioi.rb +1 -3
- data/lib/rio/rrl/path.rb +1 -11
- data/lib/rio/rrl/withpath.rb +8 -48
- data/lib/rio/scheme/aryio.rb +1 -1
- data/lib/rio/scheme/cmdio.rb +3 -15
- data/lib/rio/scheme/cmdpipe.rb +1 -5
- data/lib/rio/scheme/fd.rb +1 -1
- data/lib/rio/scheme/ftp.rb +1 -40
- data/lib/rio/scheme/http.rb +10 -7
- data/lib/rio/scheme/null.rb +1 -1
- data/lib/rio/scheme/path.rb +1 -63
- data/lib/rio/scheme/stderr.rb +1 -2
- data/lib/rio/scheme/stdio.rb +3 -3
- data/lib/rio/scheme/strio.rb +1 -3
- data/lib/rio/scheme/sysio.rb +1 -1
- data/lib/rio/scheme/tcp.rb +1 -2
- data/lib/rio/scheme/temp.rb +9 -38
- data/lib/rio/state.rb +4 -38
- data/lib/rio/state/data.rb +4 -5
- data/lib/rio/state/error.rb +2 -6
- data/lib/rio/stream.rb +1 -31
- data/lib/rio/stream/base.rb +1 -5
- data/lib/rio/stream/duplex.rb +1 -16
- data/lib/rio/stream/open.rb +1 -11
- data/lib/rio/symantics.rb +1 -1
- data/lib/rio/tempdir.rb +0 -2
- data/lib/rio/to_rio.rb +1 -1
- data/lib/rio/to_rio/all.rb +1 -1
- data/lib/rio/to_rio/array.rb +1 -1
- data/lib/rio/to_rio/io.rb +1 -1
- data/lib/rio/to_rio/object.rb +1 -1
- data/lib/rio/to_rio/string.rb +1 -1
- data/lib/rio/undef_rake_dsl.rb +3 -0
- data/lib/rio/uri/file.rb +1 -18
- data/lib/rio/uriref.rb +1 -18
- data/lib/rio/util.rb +1 -1
- data/lib/rio/version.rb +2 -2
- data/misc/update-copyright.rb +2 -2
- data/rio.gemspec +2 -3
- data/test/env.sh +1 -2
- data/test/http/tc/copy_from_http.rb +0 -1
- data/test/runhttp.rb +2 -1
- data/test/runtests.rb +7 -5
- data/test/tc/copyarray.rb +4 -4
- data/test/tc/copydir.rb +1 -1
- metadata +15 -47
data/lib/rio/fwd.rb
CHANGED
@@ -1,15 +1,38 @@
|
|
1
|
-
require 'forwardable'
|
2
|
-
|
3
1
|
module RIO
|
4
2
|
module Fwd
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
3
|
+
def fwd_reader(target, method)
|
4
|
+
line_no = __LINE__
|
5
|
+
str = %{
|
6
|
+
def #{method}(*args, &block)
|
7
|
+
#{target}.__send__(:#{method}, *args, &block)
|
8
|
+
end
|
9
|
+
}
|
10
|
+
module_eval(str,__FILE__,line_no)
|
11
|
+
end
|
12
|
+
def fwd_readers(target, *methods)
|
13
|
+
methods.each do |method|
|
14
|
+
fwd_reader target, method
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def fwd_writer(target, method)
|
19
|
+
line_no = __LINE__
|
20
|
+
str = %{
|
21
|
+
def #{method}=(*args, &block)
|
22
|
+
#{target}.__send__(:#{method}=, *args, &block)
|
11
23
|
end
|
24
|
+
}
|
25
|
+
module_eval(str,__FILE__,line_no)
|
26
|
+
end
|
27
|
+
def fwd_writers(target, *methods)
|
28
|
+
methods.each do |method|
|
29
|
+
fwd_writer target, method
|
12
30
|
end
|
13
31
|
end
|
32
|
+
|
33
|
+
def fwd(target,*methods)
|
34
|
+
fwd_readers target, *methods
|
35
|
+
fwd_writers target, *methods
|
36
|
+
end
|
14
37
|
end
|
15
38
|
end
|
data/lib/rio/grande.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#--
|
2
2
|
# ===========================================================================
|
3
|
-
# Copyright (c) 2005-
|
3
|
+
# Copyright (c) 2005-2017 Christopher Kleckner
|
4
4
|
# All rights reserved
|
5
5
|
#
|
6
6
|
# This file is part of the Rio library for ruby.
|
@@ -59,10 +59,8 @@ module RIO
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def fixnumss(*args)
|
62
|
-
|
63
|
-
#p args[0].class,ss_type?(_ss_keys())
|
64
62
|
ss_args = cx['ss_args'] = args
|
65
|
-
if ss_args.length == 1 and ss_args[0].kind_of?(
|
63
|
+
if ss_args.length == 1 and ss_args[0].kind_of?(Integer) and !cx.has_key?('dirlines')
|
66
64
|
ans = nil
|
67
65
|
ss_type = ss_type?(_ss_keys())
|
68
66
|
|
data/lib/rio/handle.rb
CHANGED
data/lib/rio/if.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#--
|
2
2
|
# ===========================================================================
|
3
|
-
# Copyright (c) 2005-
|
3
|
+
# Copyright (c) 2005-2017 Christopher Kleckner
|
4
4
|
# All rights reserved
|
5
5
|
#
|
6
6
|
# This file is part of the Rio library for ruby.
|
@@ -37,16 +37,10 @@ require 'rio/if/internal'
|
|
37
37
|
|
38
38
|
module RIO
|
39
39
|
module IF
|
40
|
-
#autoload :Grande, 'rio/if/grande'
|
41
40
|
require 'rio/if/grande'
|
42
|
-
|
43
|
-
#autoload :GrandeEntry, 'rio/if/grande_entry'
|
44
41
|
require 'rio/if/grande_entry'
|
45
|
-
#autoload :GrandeStream, 'rio/if/grande_stream'
|
46
42
|
require 'rio/if/grande_stream'
|
47
|
-
#autoload :Test, 'rio/if/test'
|
48
43
|
require 'rio/if/test'
|
49
|
-
|
50
44
|
require 'rio/if/path'
|
51
45
|
require 'rio/if/fileordir'
|
52
46
|
require 'rio/if/file'
|
data/lib/rio/if/basic.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#--
|
2
2
|
# ===========================================================================
|
3
|
-
# Copyright (c) 2005-
|
3
|
+
# Copyright (c) 2005-2017 Christopher Kleckner
|
4
4
|
# All rights reserved
|
5
5
|
#
|
6
6
|
# This file is part of the Rio library for ruby.
|
@@ -23,9 +23,5 @@
|
|
23
23
|
#
|
24
24
|
module RIO
|
25
25
|
class Rio
|
26
|
-
|
27
|
-
#def to_rl() target.to_rl end
|
28
|
-
|
29
|
-
|
30
26
|
end
|
31
27
|
end
|
data/lib/rio/if/csv.rb
CHANGED
data/lib/rio/if/dir.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
#--
|
3
3
|
# ===========================================================================
|
4
|
-
# Copyright (c) 2005-
|
4
|
+
# Copyright (c) 2005-2017 Christopher Kleckner
|
5
5
|
# All rights reserved
|
6
6
|
#
|
7
7
|
# This file is part of the Rio library for ruby.
|
data/lib/rio/if/file.rb
CHANGED
data/lib/rio/if/fileordir.rb
CHANGED
data/lib/rio/if/grande.rb
CHANGED
data/lib/rio/if/grande_entry.rb
CHANGED
data/lib/rio/if/grande_stream.rb
CHANGED
data/lib/rio/if/internal.rb
CHANGED
data/lib/rio/if/path.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
#--
|
3
3
|
# ===========================================================================
|
4
|
-
# Copyright (c) 2005-
|
4
|
+
# Copyright (c) 2005-2017 Christopher Kleckner
|
5
5
|
# All rights reserved
|
6
6
|
#
|
7
7
|
# This file is part of the Rio library for ruby.
|
data/lib/rio/if/rubyio.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
#--
|
3
3
|
# ===========================================================================
|
4
|
-
# Copyright (c) 2005-
|
4
|
+
# Copyright (c) 2005-2017 Christopher Kleckner
|
5
5
|
# All rights reserved
|
6
6
|
#
|
7
7
|
# This file is part of the Rio library for ruby.
|
data/lib/rio/if/string.rb
CHANGED
data/lib/rio/if/temp.rb
CHANGED
data/lib/rio/if/test.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
#--
|
3
3
|
# ===========================================================================
|
4
|
-
# Copyright (c) 2005-
|
4
|
+
# Copyright (c) 2005-2017 Christopher Kleckner
|
5
5
|
# All rights reserved
|
6
6
|
#
|
7
7
|
# This file is part of the Rio library for ruby.
|
data/lib/rio/if/yaml.rb
CHANGED
data/lib/rio/ioh.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#--
|
2
2
|
# ===========================================================================
|
3
|
-
# Copyright (c) 2005-
|
3
|
+
# Copyright (c) 2005-2017 Christopher Kleckner
|
4
4
|
# All rights reserved
|
5
5
|
#
|
6
6
|
# This file is part of the Rio library for ruby.
|
@@ -35,7 +35,6 @@ module RIO
|
|
35
35
|
def initialize_copy(other)
|
36
36
|
#p callstr('ioh:initialize_copy',other)
|
37
37
|
super
|
38
|
-
#p @ios
|
39
38
|
@ios = other.ios.clone unless other.ios.nil?
|
40
39
|
end
|
41
40
|
def callstr(func,*args)
|
@@ -90,16 +89,39 @@ module RIO
|
|
90
89
|
end
|
91
90
|
self
|
92
91
|
end
|
93
|
-
extend
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
92
|
+
extend RIO::Fwd
|
93
|
+
|
94
|
+
fwd_readers :handle,
|
95
|
+
:binmode,
|
96
|
+
:stat,
|
97
|
+
:rewind,
|
98
|
+
:each,
|
99
|
+
:each_byte,
|
100
|
+
:gets,
|
101
|
+
:getc,
|
102
|
+
:each_line,
|
103
|
+
:read,
|
104
|
+
:readlines,
|
105
|
+
:readline,
|
106
|
+
:sysread,
|
107
|
+
:print,
|
108
|
+
:printf,
|
109
|
+
:putc,
|
110
|
+
:write,
|
111
|
+
:syswrite,
|
112
|
+
:fileno,
|
113
|
+
:close_read,
|
114
|
+
:close_write,
|
115
|
+
:fsync,
|
116
|
+
:fcntl,
|
117
|
+
:ioctl,
|
118
|
+
:<<
|
119
|
+
|
120
|
+
fwd :handle,
|
121
|
+
:pos,
|
122
|
+
:lineno,
|
123
|
+
:sync
|
124
|
+
|
103
125
|
def set_encoding(*args)
|
104
126
|
handle.set_encoding(*args)
|
105
127
|
end
|
@@ -141,22 +163,18 @@ module RIO
|
|
141
163
|
end
|
142
164
|
def closed?() ios.nil? end
|
143
165
|
def each(&block)
|
144
|
-
#p handle
|
145
166
|
while filename = handle.read
|
146
|
-
#p "IOH: #{filename.inspect} FS_ENCODING=#{FS_ENCODING}"
|
147
|
-
#yield filename.force_encoding(FS_ENCODING)
|
148
167
|
yield filename
|
149
168
|
end
|
150
169
|
end
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
:pos,:pos=,:tell,:seek,:rewind)
|
170
|
+
|
171
|
+
extend RIO::Fwd
|
172
|
+
fwd :handle, :pos
|
173
|
+
fwd_readers :handle,
|
174
|
+
:read,
|
175
|
+
:tell,
|
176
|
+
:seek,
|
177
|
+
:rewind
|
160
178
|
end
|
161
179
|
end
|
162
180
|
end
|
data/lib/rio/iomode.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#--
|
2
2
|
# ===========================================================================
|
3
|
-
# Copyright (c) 2005-
|
3
|
+
# Copyright (c) 2005-2017 Christopher Kleckner
|
4
4
|
# All rights reserved
|
5
5
|
#
|
6
6
|
# This file is part of the Rio library for ruby.
|
@@ -60,8 +60,8 @@ module RIO
|
|
60
60
|
def allows_write?()
|
61
61
|
primarily_write? or allows_both?
|
62
62
|
end
|
63
|
-
extend
|
64
|
-
|
63
|
+
extend RIO::Fwd
|
64
|
+
fwd_readers :@mode,:=~,:==,:===
|
65
65
|
end
|
66
66
|
end
|
67
67
|
module Mode
|
data/lib/rio/ios/fail.rb
CHANGED
data/lib/rio/ios/generic.rb
CHANGED
data/lib/rio/ios/mode.rb
CHANGED
data/lib/rio/ios/null.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#--
|
2
2
|
# ===========================================================================
|
3
|
-
# Copyright (c) 2005-
|
3
|
+
# Copyright (c) 2005-2017 Christopher Kleckner
|
4
4
|
# All rights reserved
|
5
5
|
#
|
6
6
|
# This file is part of the Rio library for ruby.
|
@@ -62,19 +62,14 @@ module RIO
|
|
62
62
|
def each_line(sep_string=$/,&block) self end
|
63
63
|
def each_byte(sep_string=$/,&block) self end
|
64
64
|
def eof?() true end
|
65
|
-
#def fcntl(integer_cmd,arg) notsupported(:fcntl) end
|
66
|
-
#def fileno() notsupported(:fileno) end
|
67
|
-
#def to_i() notsupported(:to_i) end
|
68
65
|
def flush() nil end
|
69
66
|
def fsync() nil end
|
70
67
|
def getc() nil end
|
71
68
|
def gets(sep_string=$/) nil end
|
72
|
-
#def ioctl(integer_cmd,arg) notsupported(:ioctl) end
|
73
69
|
def tty?() false end
|
74
70
|
def isatty() tty? end
|
75
71
|
def lineno() @lineno end
|
76
72
|
def lineno=(a) @lineno = a; lineno() end
|
77
|
-
#def pid() notsupported(:pid) end
|
78
73
|
def pos() 0 end
|
79
74
|
def tell() pos() end
|
80
75
|
def pos=(v) @pos = v; pos end
|
@@ -90,13 +85,6 @@ module RIO
|
|
90
85
|
def reopen(*args) self end
|
91
86
|
def rewind() 0 end
|
92
87
|
def seek(amount,whence) 0 end
|
93
|
-
#def stat() notsupported(:stat) end
|
94
|
-
#def sync() notsupported(:sync) end
|
95
|
-
#def sync=(v) notsupported(:sync=) end
|
96
|
-
#def sysread() notsupported(:sysread) end
|
97
|
-
#def sysseek() notsupported(:sysseek) end
|
98
|
-
#def syswrite() notsupported(:syswrite) end
|
99
|
-
#def ungetc() notsupported(:ungetc) end
|
100
88
|
def write(str) str.length end
|
101
89
|
|
102
90
|
def callstr(func,*args)
|
data/lib/rio/iowrap.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#--
|
2
2
|
# ===========================================================================
|
3
|
-
# Copyright (c) 2005-
|
3
|
+
# Copyright (c) 2005-2017 Christopher Kleckner
|
4
4
|
# All rights reserved
|
5
5
|
#
|
6
6
|
# This file is part of the Rio library for ruby.
|
@@ -93,20 +93,7 @@ module RIO
|
|
93
93
|
@eof = true unless ans = handle.sysread(*args)
|
94
94
|
ans
|
95
95
|
end
|
96
|
-
# extend Forwardable
|
97
|
-
# def_instance_delegators(:handle,
|
98
|
-
# :binmode,
|
99
|
-
# :stat,
|
100
|
-
# :rewind,
|
101
|
-
# :<<,:print,:printf,:puts,:putc,:write,:syswrite,
|
102
|
-
# :pos,:pos=,:lineno,:lineno=,
|
103
|
-
# :fileno,
|
104
|
-
# :close_read,:close_write,
|
105
|
-
# :fsync,:sync,:sync=,:fcntl,:ioctl)
|
106
96
|
|
107
|
-
#def puts(*args)
|
108
|
-
# handle.puts(*args)
|
109
|
-
#end
|
110
97
|
def method_missing(sym,*args,&block)
|
111
98
|
#p callstr('method_missing',sym,*args)
|
112
99
|
handle.__send__(sym,*args,&block)
|