tb 0.8 → 0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/README +14 -7
  3. data/bin/tb +3 -3
  4. data/lib/tb.rb +3 -3
  5. data/lib/tb/basic.rb +34 -34
  6. data/lib/tb/catreader.rb +3 -3
  7. data/lib/tb/cmd_cat.rb +5 -5
  8. data/lib/tb/cmd_consecutive.rb +4 -4
  9. data/lib/tb/cmd_crop.rb +4 -4
  10. data/lib/tb/cmd_cross.rb +3 -3
  11. data/lib/tb/cmd_cut.rb +3 -3
  12. data/lib/tb/cmd_git.rb +3 -3
  13. data/lib/tb/cmd_grep.rb +3 -3
  14. data/lib/tb/cmd_group.rb +3 -3
  15. data/lib/tb/cmd_gsub.rb +3 -3
  16. data/lib/tb/cmd_help.rb +3 -3
  17. data/lib/tb/cmd_join.rb +3 -3
  18. data/lib/tb/cmd_ls.rb +3 -3
  19. data/lib/tb/cmd_melt.rb +3 -3
  20. data/lib/tb/cmd_mheader.rb +3 -3
  21. data/lib/tb/cmd_nest.rb +3 -3
  22. data/lib/tb/cmd_newfield.rb +17 -7
  23. data/lib/tb/cmd_rename.rb +3 -3
  24. data/lib/tb/cmd_shape.rb +3 -3
  25. data/lib/tb/cmd_sort.rb +3 -3
  26. data/lib/tb/cmd_svn.rb +3 -3
  27. data/lib/tb/cmd_tar.rb +3 -3
  28. data/lib/tb/cmd_to_csv.rb +4 -4
  29. data/lib/tb/cmd_to_json.rb +3 -3
  30. data/lib/tb/cmd_to_ltsv.rb +4 -4
  31. data/lib/tb/cmd_to_pnm.rb +3 -3
  32. data/lib/tb/cmd_to_pp.rb +3 -3
  33. data/lib/tb/cmd_to_tsv.rb +4 -4
  34. data/lib/tb/cmd_to_yaml.rb +3 -3
  35. data/lib/tb/cmd_unmelt.rb +3 -3
  36. data/lib/tb/cmd_unnest.rb +5 -4
  37. data/lib/tb/cmdmain.rb +3 -3
  38. data/lib/tb/cmdtop.rb +3 -3
  39. data/lib/tb/cmdutil.rb +3 -3
  40. data/lib/tb/csv.rb +10 -4
  41. data/lib/tb/customcmp.rb +3 -3
  42. data/lib/tb/customeq.rb +3 -3
  43. data/lib/tb/enumerable.rb +3 -3
  44. data/lib/tb/enumerator.rb +3 -3
  45. data/lib/tb/ex_enumerable.rb +2 -2
  46. data/lib/tb/ex_enumerator.rb +4 -4
  47. data/lib/tb/fieldset.rb +3 -3
  48. data/lib/tb/fileenumerator.rb +6 -6
  49. data/lib/tb/func.rb +3 -3
  50. data/lib/tb/json.rb +3 -3
  51. data/lib/tb/ltsv.rb +32 -7
  52. data/lib/tb/pnm.rb +3 -3
  53. data/lib/tb/reader.rb +3 -3
  54. data/lib/tb/record.rb +3 -3
  55. data/lib/tb/revcmp.rb +3 -3
  56. data/lib/tb/ropen.rb +23 -23
  57. data/lib/tb/search.rb +7 -7
  58. data/lib/tb/tsv.rb +3 -3
  59. data/lib/tb/zipper.rb +3 -3
  60. data/sample/excel2csv +36 -36
  61. data/sample/poi-xls2csv.rb +78 -78
  62. data/sample/poi-xls2csv.sh +3 -3
  63. data/sample/tbplot +214 -112
  64. data/test/test_basic.rb +4 -4
  65. data/test/test_cmd_newfield.rb +17 -3
  66. data/test/test_ex_enumerable.rb +18 -18
  67. data/test/test_ltsv.rb +8 -0
  68. metadata +5 -5
@@ -1,9 +1,9 @@
1
1
  # Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
2
- #
2
+ #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions
5
5
  # are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright
8
8
  # notice, this list of conditions and the following disclaimer.
9
9
  # 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
13
13
  # 3. The name of the author may not be used to endorse or promote
14
14
  # products derived from this software without specific prior
15
15
  # written permission.
16
- #
16
+ #
17
17
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18
18
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
19
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -1,9 +1,9 @@
1
1
  # Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
2
- #
2
+ #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions
5
5
  # are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright
8
8
  # notice, this list of conditions and the following disclaimer.
9
9
  # 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
13
13
  # 3. The name of the author may not be used to endorse or promote
14
14
  # products derived from this software without specific prior
15
15
  # written permission.
16
- #
16
+ #
17
17
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18
18
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
19
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -1,9 +1,9 @@
1
1
  # Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
2
- #
2
+ #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions
5
5
  # are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright
8
8
  # notice, this list of conditions and the following disclaimer.
9
9
  # 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
13
13
  # 3. The name of the author may not be used to endorse or promote
14
14
  # products derived from this software without specific prior
15
15
  # written permission.
16
- #
16
+ #
17
17
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18
18
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
19
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -31,7 +31,7 @@ Tb::Cmd.subcommands << 'to-tsv'
31
31
  def (Tb::Cmd).op_to_tsv
32
32
  op = OptionParser.new
33
33
  op.banner = "Usage: tb to-tsv [OPTS] [TABLE]\n" +
34
- "Convert a table to TSV (Tab Separated Value)."
34
+ "Convert a table to TSV (Tab Separated Values)."
35
35
  define_common_option(op, "hNo", "--no-pager")
36
36
  op
37
37
  end
@@ -1,9 +1,9 @@
1
1
  # Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
2
- #
2
+ #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions
5
5
  # are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright
8
8
  # notice, this list of conditions and the following disclaimer.
9
9
  # 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
13
13
  # 3. The name of the author may not be used to endorse or promote
14
14
  # products derived from this software without specific prior
15
15
  # written permission.
16
- #
16
+ #
17
17
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18
18
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
19
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -1,9 +1,9 @@
1
1
  # Copyright (C) 2012 Tanaka Akira <akr@fsij.org>
2
- #
2
+ #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions
5
5
  # are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright
8
8
  # notice, this list of conditions and the following disclaimer.
9
9
  # 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
13
13
  # 3. The name of the author may not be used to endorse or promote
14
14
  # products derived from this software without specific prior
15
15
  # written permission.
16
- #
16
+ #
17
17
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18
18
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
19
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -1,9 +1,9 @@
1
1
  # Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
2
- #
2
+ #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions
5
5
  # are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright
8
8
  # notice, this list of conditions and the following disclaimer.
9
9
  # 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
13
13
  # 3. The name of the author may not be used to endorse or promote
14
14
  # products derived from this software without specific prior
15
15
  # written permission.
16
- #
16
+ #
17
17
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18
18
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
19
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -91,7 +91,8 @@ def (Tb::Cmd).main_unnest(argv)
91
91
  }
92
92
  y.set_header header2
93
93
  }.each {|pairs|
94
- pairs2 = pairs.reject {|f, v| f == target_field }
94
+ pairs2 = {}
95
+ pairs.each {|f, v| pairs2[f] = v if f != target_field }
95
96
  ntbl = pairs[target_field]
96
97
  if ntbl.nil? || ntbl.empty?
97
98
  if Tb::Cmd.opt_unnest_outer
@@ -1,9 +1,9 @@
1
1
  # Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
2
- #
2
+ #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions
5
5
  # are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright
8
8
  # notice, this list of conditions and the following disclaimer.
9
9
  # 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
13
13
  # 3. The name of the author may not be used to endorse or promote
14
14
  # products derived from this software without specific prior
15
15
  # written permission.
16
- #
16
+ #
17
17
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18
18
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
19
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -1,9 +1,9 @@
1
1
  # Copyright (C) 2011-2013 Tanaka Akira <akr@fsij.org>
2
- #
2
+ #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions
5
5
  # are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright
8
8
  # notice, this list of conditions and the following disclaimer.
9
9
  # 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
13
13
  # 3. The name of the author may not be used to endorse or promote
14
14
  # products derived from this software without specific prior
15
15
  # written permission.
16
- #
16
+ #
17
17
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18
18
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
19
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -1,9 +1,9 @@
1
1
  # Copyright (C) 2011-2013 Tanaka Akira <akr@fsij.org>
2
- #
2
+ #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions
5
5
  # are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright
8
8
  # notice, this list of conditions and the following disclaimer.
9
9
  # 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
13
13
  # 3. The name of the author may not be used to endorse or promote
14
14
  # products derived from this software without specific prior
15
15
  # written permission.
16
- #
16
+ #
17
17
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18
18
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
19
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -1,11 +1,11 @@
1
1
  # lib/tb/csv.rb - CSV related fetures for table library
2
2
  #
3
- # Copyright (C) 2010-2012 Tanaka Akira <akr@fsij.org>
4
- #
3
+ # Copyright (C) 2010-2013 Tanaka Akira <akr@fsij.org>
4
+ #
5
5
  # Redistribution and use in source and binary forms, with or without
6
6
  # modification, are permitted provided that the following conditions
7
7
  # are met:
8
- #
8
+ #
9
9
  # 1. Redistributions of source code must retain the above copyright
10
10
  # notice, this list of conditions and the following disclaimer.
11
11
  # 2. Redistributions in binary form must reproduce the above
@@ -15,7 +15,7 @@
15
15
  # 3. The name of the author may not be used to endorse or promote
16
16
  # products derived from this software without specific prior
17
17
  # written permission.
18
- #
18
+ #
19
19
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
20
20
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
21
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -62,6 +62,12 @@ class Tb
62
62
  nil
63
63
  end
64
64
 
65
+ def Tb.csv_read_aa(csv)
66
+ aa = []
67
+ Tb.csv_stream_input(csv) {|ary| aa << ary }
68
+ aa
69
+ end
70
+
65
71
  class CSVReader
66
72
  def initialize(input)
67
73
  @csv = CSV.new(input)
@@ -1,9 +1,9 @@
1
1
  # Copyright (C) 2012 Tanaka Akira <akr@fsij.org>
2
- #
2
+ #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions
5
5
  # are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright
8
8
  # notice, this list of conditions and the following disclaimer.
9
9
  # 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
13
13
  # 3. The name of the author may not be used to endorse or promote
14
14
  # products derived from this software without specific prior
15
15
  # written permission.
16
- #
16
+ #
17
17
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18
18
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
19
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -1,9 +1,9 @@
1
1
  # Copyright (C) 2012 Tanaka Akira <akr@fsij.org>
2
- #
2
+ #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions
5
5
  # are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright
8
8
  # notice, this list of conditions and the following disclaimer.
9
9
  # 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
13
13
  # 3. The name of the author may not be used to endorse or promote
14
14
  # products derived from this software without specific prior
15
15
  # written permission.
16
- #
16
+ #
17
17
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18
18
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
19
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -1,9 +1,9 @@
1
1
  # Copyright (C) 2012-2013 Tanaka Akira <akr@fsij.org>
2
- #
2
+ #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions
5
5
  # are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright
8
8
  # notice, this list of conditions and the following disclaimer.
9
9
  # 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
13
13
  # 3. The name of the author may not be used to endorse or promote
14
14
  # products derived from this software without specific prior
15
15
  # written permission.
16
- #
16
+ #
17
17
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18
18
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
19
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -1,9 +1,9 @@
1
1
  # Copyright (C) 2012 Tanaka Akira <akr@fsij.org>
2
- #
2
+ #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions
5
5
  # are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright
8
8
  # notice, this list of conditions and the following disclaimer.
9
9
  # 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
13
13
  # 3. The name of the author may not be used to endorse or promote
14
14
  # products derived from this software without specific prior
15
15
  # written permission.
16
- #
16
+ #
17
17
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18
18
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
19
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -315,7 +315,7 @@ module Enumerable
315
315
  mapfunc = opts[:map]
316
316
  opts = opts.dup
317
317
  opts[:map] = mapfunc ?
318
- lambda {|v| Marshal.dump(mapfunc.call(v)) } :
318
+ lambda {|v| Marshal.dump(mapfunc.call(v)) } :
319
319
  lambda {|v| Marshal.dump(v) }
320
320
  uniqfunc = opts[:unique]
321
321
  if uniqfunc
@@ -566,7 +566,7 @@ module Enumerable
566
566
  # Note that +detect_group_by+ can be cascaeded but
567
567
  # It doesn't work as nested manner.
568
568
  #
569
- # (0..9).detect_group_by(
569
+ # (0..9).detect_group_by(
570
570
  # lambda {|v| print "[" },
571
571
  # lambda {|v| print "]" }) {|v|
572
572
  # v.even?
@@ -1,9 +1,9 @@
1
1
  # Copyright (C) 2012 Tanaka Akira <akr@fsij.org>
2
- #
2
+ #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions
5
5
  # are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright
8
8
  # notice, this list of conditions and the following disclaimer.
9
9
  # 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
13
13
  # 3. The name of the author may not be used to endorse or promote
14
14
  # products derived from this software without specific prior
15
15
  # written permission.
16
- #
16
+ #
17
17
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18
18
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
19
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -38,7 +38,7 @@ module Tb::ExEnumerator
38
38
  #
39
39
  # Tb::Enumerator.merge_sorted iterates keys in all of the enumerators.
40
40
  # It yields an array which contains a key and enumerators which has the key.
41
- # The array contains nil if corresponding enumerator don't have the key.
41
+ # The array contains nil if corresponding enumerator don't have the key.
42
42
  #
43
43
  # The block may or may not use +next+ method to advance enumerators.
44
44
  # Anyway Tb::Enumerator.merge_sorted advance enumerators until peeked key is
@@ -1,11 +1,11 @@
1
1
  # lib/tb/fieldset.rb - Tb::FieldSet class
2
2
  #
3
3
  # Copyright (C) 2011-2012 Tanaka Akira <akr@fsij.org>
4
- #
4
+ #
5
5
  # Redistribution and use in source and binary forms, with or without
6
6
  # modification, are permitted provided that the following conditions
7
7
  # are met:
8
- #
8
+ #
9
9
  # 1. Redistributions of source code must retain the above copyright
10
10
  # notice, this list of conditions and the following disclaimer.
11
11
  # 2. Redistributions in binary form must reproduce the above
@@ -15,7 +15,7 @@
15
15
  # 3. The name of the author may not be used to endorse or promote
16
16
  # products derived from this software without specific prior
17
17
  # written permission.
18
- #
18
+ #
19
19
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
20
20
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
21
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -1,9 +1,9 @@
1
1
  # Copyright (C) 2012 Tanaka Akira <akr@fsij.org>
2
- #
2
+ #
3
3
  # Redistribution and use in source and binary forms, with or without
4
4
  # modification, are permitted provided that the following conditions
5
5
  # are met:
6
- #
6
+ #
7
7
  # 1. Redistributions of source code must retain the above copyright
8
8
  # notice, this list of conditions and the following disclaimer.
9
9
  # 2. Redistributions in binary form must reproduce the above
@@ -13,7 +13,7 @@
13
13
  # 3. The name of the author may not be used to endorse or promote
14
14
  # products derived from this software without specific prior
15
15
  # written permission.
16
- #
16
+ #
17
17
  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
18
18
  # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
19
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -128,7 +128,7 @@ class Tb::FileEnumerator
128
128
  end
129
129
  rescue EOFError
130
130
  ensure
131
- io.close
131
+ io.close
132
132
  end
133
133
  }
134
134
  else
@@ -155,7 +155,7 @@ class Tb::FileEnumerator
155
155
  def closed?
156
156
  @io.nil?
157
157
  end
158
-
158
+
159
159
  def finalize
160
160
  @io.close
161
161
  @io = nil
@@ -349,7 +349,7 @@ class Tb::FileHeaderEnumerator < Tb::FileEnumerator
349
349
  end
350
350
  rescue EOFError
351
351
  ensure
352
- io.close
352
+ io.close
353
353
  end
354
354
  }
355
355
  end