rio 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +1 -1
  3. data/README +1 -1
  4. data/lib/rio.rb +5 -4
  5. data/lib/rio/abstract_method.rb +1 -1
  6. data/lib/rio/alturi.rb +10 -69
  7. data/lib/rio/alturi/algorithm.rb +1 -18
  8. data/lib/rio/alturi/escape.rb +0 -4
  9. data/lib/rio/alturi/parse.rb +0 -29
  10. data/lib/rio/alturi/path_parts.rb +0 -2
  11. data/lib/rio/alturi/uri_parts.rb +3 -32
  12. data/lib/rio/argv.rb +1 -1
  13. data/lib/rio/arraynge.rb +1 -3
  14. data/lib/rio/arycopy.rb +1 -1
  15. data/lib/rio/assert.rb +31 -47
  16. data/lib/rio/base.rb +1 -1
  17. data/lib/rio/callstr.rb +1 -1
  18. data/lib/rio/const.rb +1 -1
  19. data/lib/rio/construct.rb +1 -1
  20. data/lib/rio/constructor.rb +1 -1
  21. data/lib/rio/context.rb +8 -4
  22. data/lib/rio/context/autoclose.rb +1 -1
  23. data/lib/rio/context/binmode.rb +1 -7
  24. data/lib/rio/context/copying.rb +1 -1
  25. data/lib/rio/context/cxx.rb +1 -1
  26. data/lib/rio/context/dir.rb +1 -1
  27. data/lib/rio/context/encoding.rb +1 -2
  28. data/lib/rio/context/gzip.rb +1 -1
  29. data/lib/rio/context/methods.rb +1 -6
  30. data/lib/rio/context/skip.rb +1 -1
  31. data/lib/rio/context/stream.rb +1 -8
  32. data/lib/rio/cp.rb +1 -1
  33. data/lib/rio/cxuri.rb +11 -7
  34. data/lib/rio/dbg/trace_states.rb +0 -2
  35. data/lib/rio/def.rb +1 -1
  36. data/lib/rio/dir.rb +2 -2
  37. data/lib/rio/doc.rb +1 -1
  38. data/lib/rio/entrysel.rb +6 -6
  39. data/lib/rio/exception.rb +1 -1
  40. data/lib/rio/exception/copy.rb +1 -1
  41. data/lib/rio/exception/notimplemented.rb +1 -1
  42. data/lib/rio/exception/notsupported.rb +1 -1
  43. data/lib/rio/exception/open.rb +1 -12
  44. data/lib/rio/exception/state.rb +1 -1
  45. data/lib/rio/ext.rb +1 -8
  46. data/lib/rio/ext/csv.rb +1 -25
  47. data/lib/rio/ext/csv/csv-legacy.rb +1 -49
  48. data/lib/rio/ext/csv/csv.rb +1 -24
  49. data/lib/rio/ext/csv/filter.rb +1 -19
  50. data/lib/rio/ext/if.rb +1 -1
  51. data/lib/rio/ext/mp3info.rb +6 -5
  52. data/lib/rio/ext/splitlines.rb +1 -23
  53. data/lib/rio/ext/yaml.rb +1 -16
  54. data/lib/rio/ext/yaml/doc.rb +1 -6
  55. data/lib/rio/ext/yaml/tie.rb +4 -7
  56. data/lib/rio/ext/zipfile.rb +1 -56
  57. data/lib/rio/ext/zipfile/fs.rb +1 -30
  58. data/lib/rio/ext/zipfile/rl.rb +1 -128
  59. data/lib/rio/ext/zipfile/rootdir.rb +1 -30
  60. data/lib/rio/ext/zipfile/state.rb +1 -105
  61. data/lib/rio/ext/zipfile/wrap.rb +1 -86
  62. data/lib/rio/factory.rb +2 -100
  63. data/lib/rio/fibpipe.rb +0 -98
  64. data/lib/rio/file.rb +1 -12
  65. data/lib/rio/filter.rb +1 -1
  66. data/lib/rio/filter/closeoneof.rb +1 -10
  67. data/lib/rio/filter/gzip.rb +1 -16
  68. data/lib/rio/fs.rb +75 -92
  69. data/lib/rio/fs/base.rb +1 -1
  70. data/lib/rio/fs/impl.rb +1 -1
  71. data/lib/rio/fs/native.rb +1 -1
  72. data/lib/rio/fs/stream.rb +1 -1
  73. data/lib/rio/fs/url.rb +1 -1
  74. data/lib/rio/ftp/conncache.rb +1 -15
  75. data/lib/rio/ftp/dir.rb +1 -2
  76. data/lib/rio/ftp/fs.rb +1 -13
  77. data/lib/rio/fwd.rb +31 -8
  78. data/lib/rio/grande.rb +2 -4
  79. data/lib/rio/handle.rb +1 -1
  80. data/lib/rio/if.rb +1 -7
  81. data/lib/rio/if/basic.rb +1 -5
  82. data/lib/rio/if/csv.rb +1 -1
  83. data/lib/rio/if/dir.rb +1 -1
  84. data/lib/rio/if/file.rb +1 -1
  85. data/lib/rio/if/fileordir.rb +1 -1
  86. data/lib/rio/if/grande.rb +1 -1
  87. data/lib/rio/if/grande_entry.rb +1 -1
  88. data/lib/rio/if/grande_stream.rb +1 -1
  89. data/lib/rio/if/internal.rb +1 -1
  90. data/lib/rio/if/path.rb +1 -1
  91. data/lib/rio/if/rubyio.rb +1 -1
  92. data/lib/rio/if/string.rb +1 -1
  93. data/lib/rio/if/temp.rb +1 -1
  94. data/lib/rio/if/test.rb +1 -1
  95. data/lib/rio/if/yaml.rb +1 -1
  96. data/lib/rio/ioh.rb +42 -24
  97. data/lib/rio/iomode.rb +3 -3
  98. data/lib/rio/ios/fail.rb +1 -1
  99. data/lib/rio/ios/generic.rb +1 -1
  100. data/lib/rio/ios/mode.rb +1 -1
  101. data/lib/rio/ios/null.rb +1 -13
  102. data/lib/rio/iowrap.rb +1 -14
  103. data/lib/rio/kernel.rb +1 -2
  104. data/lib/rio/local.rb +1 -13
  105. data/lib/rio/match.rb +1 -2
  106. data/lib/rio/matchrecord.rb +5 -34
  107. data/lib/rio/no_warn.rb +1 -1
  108. data/lib/rio/nullio.rb +1 -1
  109. data/lib/rio/open3.rb +1 -10
  110. data/lib/rio/ops.rb +1 -1
  111. data/lib/rio/ops/construct.rb +1 -1
  112. data/lib/rio/ops/create.rb +1 -3
  113. data/lib/rio/ops/dir.rb +4 -46
  114. data/lib/rio/ops/either.rb +1 -3
  115. data/lib/rio/ops/file.rb +1 -25
  116. data/lib/rio/ops/path.rb +1 -18
  117. data/lib/rio/ops/stream.rb +4 -5
  118. data/lib/rio/ops/stream/input.rb +1 -10
  119. data/lib/rio/ops/stream/output.rb +1 -3
  120. data/lib/rio/ops/stream/read.rb +1 -1
  121. data/lib/rio/ops/stream/write.rb +1 -1
  122. data/lib/rio/ops/symlink.rb +1 -10
  123. data/lib/rio/path.rb +1 -4
  124. data/lib/rio/path/reset.rb +1 -6
  125. data/lib/rio/piper.rb +1 -4
  126. data/lib/rio/piper/cp.rb +1 -16
  127. data/lib/rio/prompt.rb +1 -1
  128. data/lib/rio/rectype.rb +1 -4
  129. data/lib/rio/rl/base.rb +1 -14
  130. data/lib/rio/rl/builder.rb +1 -12
  131. data/lib/rio/rl/chmap.rb +1 -11
  132. data/lib/rio/rl/fs2url.rb +1 -8
  133. data/lib/rio/rl/ioi.rb +1 -2
  134. data/lib/rio/rl/path.rb +1 -20
  135. data/lib/rio/rl/pathmethods.rb +1 -3
  136. data/lib/rio/rl/uri.rb +1 -11
  137. data/lib/rio/rl/withpath.rb +2 -30
  138. data/lib/rio/rrl/base.rb +1 -6
  139. data/lib/rio/rrl/builder.rb +2 -8
  140. data/lib/rio/rrl/chmap.rb +1 -11
  141. data/lib/rio/rrl/ioi.rb +1 -3
  142. data/lib/rio/rrl/path.rb +1 -11
  143. data/lib/rio/rrl/withpath.rb +8 -48
  144. data/lib/rio/scheme/aryio.rb +1 -1
  145. data/lib/rio/scheme/cmdio.rb +3 -15
  146. data/lib/rio/scheme/cmdpipe.rb +1 -5
  147. data/lib/rio/scheme/fd.rb +1 -1
  148. data/lib/rio/scheme/ftp.rb +1 -40
  149. data/lib/rio/scheme/http.rb +10 -7
  150. data/lib/rio/scheme/null.rb +1 -1
  151. data/lib/rio/scheme/path.rb +1 -63
  152. data/lib/rio/scheme/stderr.rb +1 -2
  153. data/lib/rio/scheme/stdio.rb +3 -3
  154. data/lib/rio/scheme/strio.rb +1 -3
  155. data/lib/rio/scheme/sysio.rb +1 -1
  156. data/lib/rio/scheme/tcp.rb +1 -2
  157. data/lib/rio/scheme/temp.rb +9 -38
  158. data/lib/rio/state.rb +4 -38
  159. data/lib/rio/state/data.rb +4 -5
  160. data/lib/rio/state/error.rb +2 -6
  161. data/lib/rio/stream.rb +1 -31
  162. data/lib/rio/stream/base.rb +1 -5
  163. data/lib/rio/stream/duplex.rb +1 -16
  164. data/lib/rio/stream/open.rb +1 -11
  165. data/lib/rio/symantics.rb +1 -1
  166. data/lib/rio/tempdir.rb +0 -2
  167. data/lib/rio/to_rio.rb +1 -1
  168. data/lib/rio/to_rio/all.rb +1 -1
  169. data/lib/rio/to_rio/array.rb +1 -1
  170. data/lib/rio/to_rio/io.rb +1 -1
  171. data/lib/rio/to_rio/object.rb +1 -1
  172. data/lib/rio/to_rio/string.rb +1 -1
  173. data/lib/rio/undef_rake_dsl.rb +3 -0
  174. data/lib/rio/uri/file.rb +1 -18
  175. data/lib/rio/uriref.rb +1 -18
  176. data/lib/rio/util.rb +1 -1
  177. data/lib/rio/version.rb +2 -2
  178. data/misc/update-copyright.rb +2 -2
  179. data/rio.gemspec +2 -3
  180. data/test/env.sh +1 -2
  181. data/test/http/tc/copy_from_http.rb +0 -1
  182. data/test/runhttp.rb +2 -1
  183. data/test/runtests.rb +7 -5
  184. data/test/tc/copyarray.rb +4 -4
  185. data/test/tc/copydir.rb +1 -1
  186. metadata +15 -47
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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,7 +59,6 @@ module RIO
59
59
  end
60
60
 
61
61
  def self.arraynge(mx,rng)
62
- #p "arraynge(#{mx},#{rng})"
63
62
  begr = rng.begin
64
63
  mxlim = (rng.exclude_end? ? mx.succ : mx)
65
64
  endr = (rng.end > mxlim ? mxlim : rng.end)
@@ -78,7 +77,6 @@ module RIO
78
77
  def self.reduce(rl)
79
78
  return rl if rl.empty?
80
79
  rl = rl.sort {|a,b| a.begin <=> b.begin}
81
- #p rl
82
80
  (1...rl.size).inject([rl[0]]) do |ans,i|
83
81
  ans[0...ans.size-1] + reduce_ranges(ans[-1],rl[i])
84
82
  end
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -33,8 +33,6 @@ module RIO
33
33
  end
34
34
  def nok(a,b,msg=nil)
35
35
  calla = caller.grep(/^#{Regexp.escape($0)}/)
36
- #calla = caller
37
- #calls = " " + (calla[0] || "")
38
36
  calls = calla.join("\n") + "\n"
39
37
  puts "FAIL" + (msg.nil? ? "" : ": #{msg}") + calls
40
38
  puts " exp: #{a.inspect}"
@@ -52,9 +50,6 @@ module RIO
52
50
  end
53
51
  return nok(exc,nil,msg)
54
52
  end
55
-
56
-
57
-
58
53
 
59
54
  def assert_equal(a,b,msg=nil)
60
55
  if a == b
@@ -77,7 +72,7 @@ module RIO
77
72
  nok(nil,nil,msg)
78
73
  end
79
74
  end
80
-
75
+
81
76
  def assert_not_equal(a,b,msg=nil)
82
77
  if a != b
83
78
  ok(a,b,msg)
@@ -131,56 +126,45 @@ module RIO
131
126
  def assert_equal_s(a,b,msg=nil) assert_equal(a.to_s,b.to_s,msg) end
132
127
  def assert_equal_a(a,b,msg=nil) assert_equal(a.sort,b.sort,msg) end
133
128
 
134
-
135
-
136
-
137
-
138
-
139
-
140
129
  def assert!(a,msg="negative assertion")
141
130
  assert((!(a)),msg)
142
131
  end
143
132
 
144
133
  def smap(a) a.map { |el| el.to_s } end
145
-
146
134
 
147
-
148
-
149
-
150
-
151
- def assert_array_equal(a,b,msg="array same regardless of order")
152
- if a.nil?
153
- assert_nil(b)
154
- elsif b.nil?
155
- assert_nil(a)
156
- else
157
- assert_equal(smap(a).sort,smap(b).sort,msg)
158
- end
135
+ def assert_array_equal(a,b,msg="array same regardless of order")
136
+ if a.nil?
137
+ assert_nil(b)
138
+ elsif b.nil?
139
+ assert_nil(a)
140
+ else
141
+ assert_equal(smap(a).sort,smap(b).sort,msg)
159
142
  end
160
- def assert_dirs_equal(exp,d,msg="")
161
- exp.each do |ent|
162
- ds = rio(d,ent.filename)
163
- assert_equal(ent.symlink?,ds.symlink?,"both symlinks, or not")
164
- unless ent.symlink?
165
- assert(ds.exist?,"entry '#{ds}' exists")
166
- end
167
- assert_equal(ent.ftype,ds.ftype,"same ftype")
168
- assert_rios_equal(ent,ds,"sub rios are the same")
143
+ end
144
+ def assert_dirs_equal(exp,d,msg="")
145
+ exp.each do |ent|
146
+ ds = rio(d,ent.filename)
147
+ assert_equal(ent.symlink?,ds.symlink?,"both symlinks, or not")
148
+ unless ent.symlink?
149
+ assert(ds.exist?,"entry '#{ds}' exists")
169
150
  end
151
+ assert_equal(ent.ftype,ds.ftype,"same ftype")
152
+ assert_rios_equal(ent,ds,"sub rios are the same")
170
153
  end
171
- def assert_rios_equal(exp,ans,msg="")
172
- case
173
- when exp.symlink?
174
- assert(ans.symlink?,"entry is a symlink")
175
- assert_equal(exp.readlink,ans.readlink,"symlinks read the same")
176
- when exp.file?
177
- assert(ans.file?,"entry is a file")
178
- assert_equal(exp.chomp.lines[],ans.chomp.lines[],"file has same contents")
179
- when exp.dir?
180
- assert(ans.dir?,"entry is a dir")
181
- assert_dirs_equal(exp,ans,"directories are the same")
182
- end
154
+ end
155
+ def assert_rios_equal(exp,ans,msg="")
156
+ case
157
+ when exp.symlink?
158
+ assert(ans.symlink?,"entry is a symlink")
159
+ assert_equal(exp.readlink,ans.readlink,"symlinks read the same")
160
+ when exp.file?
161
+ assert(ans.file?,"entry is a file")
162
+ assert_equal(exp.chomp.lines[],ans.chomp.lines[],"file has same contents")
163
+ when exp.dir?
164
+ assert(ans.dir?,"entry is a dir")
165
+ assert_dirs_equal(exp,ans,"directories are the same")
183
166
  end
167
+ end
184
168
 
185
169
  end
186
170
  end
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -41,7 +41,6 @@ module RIO
41
41
  @explicit = @explicit.clone
42
42
  end
43
43
  BEQUEATH_KEYS = %w[chomp strip rename closeoneof closeoncopy]
44
- #BEQUEATH_KEYS = %w[chomp strip rename]
45
44
  def bequeath(oldcx)
46
45
  keys = BEQUEATH_KEYS
47
46
  ncx = oldcx.clone
@@ -113,8 +112,13 @@ module RIO
113
112
  str
114
113
  end
115
114
 
116
- extend Forwardable
117
- def_instance_delegators(:@values,:[],:has_key?,:values_at,:keys)
115
+ extend RIO::Fwd
116
+ fwd_readers :@values,
117
+ :has_key?,
118
+ :values_at,
119
+ :keys,
120
+ :[]
121
+
118
122
  end
119
123
  end
120
124
  end
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -22,14 +22,9 @@
22
22
  #++
23
23
  #
24
24
 
25
-
26
- #require 'rio/context/cxx.rb'
27
- #require 'rio/iomode'
28
-
29
25
  require 'rio/context/stream'
30
26
  require 'rio/context/dir'
31
27
  require 'rio/context/skip'
32
- #require 'rio/filter'
33
28
  require 'rio/context/autoclose'
34
29
  require 'rio/context/gzip'
35
30
  require 'rio/context/copying'
@@ -59,5 +54,4 @@ module RIO
59
54
  end
60
55
  end
61
56
 
62
-
63
57
  end
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -30,7 +30,6 @@ module RIO
30
30
 
31
31
  module Methods
32
32
  def enc(*args,&block)
33
- #ioh.set_encoding(*args) if ioh
34
33
  _set_enc_from_args(*args)
35
34
  cxx(:enc_args,args,&block)
36
35
  end
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -22,14 +22,9 @@
22
22
  #++
23
23
  #
24
24
 
25
-
26
- #require 'rio/context/cxx.rb'
27
- #require 'rio/iomode'
28
-
29
25
  require 'rio/context/stream'
30
26
  require 'rio/context/dir'
31
27
  require 'rio/context/skip'
32
- #require 'rio/filter'
33
28
  require 'rio/context/autoclose'
34
29
  require 'rio/context/gzip'
35
30
  require 'rio/context/copying'
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -22,7 +22,6 @@
22
22
  #++
23
23
  #
24
24
 
25
-
26
25
  require 'rio/context/cxx.rb'
27
26
  require 'rio/iomode'
28
27
 
@@ -192,9 +191,6 @@ module RIO
192
191
  _set_sstype('skiprows')
193
192
  _rows(args,false,&block)
194
193
  end
195
-
196
-
197
-
198
194
  def bytes(nb=1,*args,&block)
199
195
  _set_sstype('bytes')
200
196
  _set_bytes(nb)
@@ -210,9 +206,6 @@ module RIO
210
206
  each(&block) if block_given?
211
207
  self
212
208
  end
213
-
214
-
215
-
216
209
  end
217
210
  end
218
211
  end
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===========================================================================
3
- # Copyright (c) 2005-2012 Christopher Kleckner
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.
@@ -22,7 +22,6 @@
22
22
  #++
23
23
  #
24
24
 
25
- require 'forwardable'
26
25
  require 'rio/alturi'
27
26
 
28
27
  module RIO
@@ -52,12 +51,17 @@ module RIO
52
51
  YAML.load(@parts.fragment) unless @parts.fragment.nil?
53
52
  end
54
53
 
55
- extend Forwardable
54
+ extend RIO::Fwd
55
+
56
+ fwd :@parts,
57
+ :authority,
58
+ :scheme,
59
+ :path,
60
+ :query,
61
+ :userinfo,
62
+ :host,
63
+ :port
56
64
 
57
- def_delegators :@parts, :authority,:scheme,:path
58
- def_delegators :@parts, :authority=,:scheme=,:path=,:query=,:query
59
- def_delegators :@parts, :userinfo,:host
60
- def_delegators :@parts, :userinfo=,:host=,:port=, :port
61
65
  def to_s
62
66
  @parts.uri
63
67
  end
@@ -14,5 +14,3 @@ module RIO
14
14
  end
15
15
  end
16
16
 
17
-
18
-