aslakhellesoy-cucumber 0.3.11 → 0.3.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.3.12 (In Git)
2
+
3
+ === Changed Features
4
+ * The data returned from Table#hashes and similar methods are frozen. Dup if you need to modify. (Aslak Hellesøy)
5
+
1
6
  == 0.3.11 2009-06-05
2
7
 
3
8
  This release just fixes a tiny bug in the formatter to fix an incompatibility
@@ -62,7 +62,7 @@ module Cucumber
62
62
  def hashes
63
63
  @hashes ||= cells_rows[1..-1].map do |row|
64
64
  row.to_hash
65
- end
65
+ end.freeze
66
66
  end
67
67
 
68
68
  # Converts this table into a Hash where the first column is
@@ -198,7 +198,7 @@ module Cucumber
198
198
  def cells_rows
199
199
  @rows ||= cell_matrix.map do |cell_row|
200
200
  @cells_class.new(self, cell_row)
201
- end
201
+ end.freeze
202
202
  end
203
203
 
204
204
  def headers
@@ -230,7 +230,7 @@ module Cucumber
230
230
  def columns
231
231
  @columns ||= cell_matrix.transpose.map do |cell_row|
232
232
  @cells_class.new(self, cell_row)
233
- end
233
+ end.freeze
234
234
  end
235
235
 
236
236
  def cell_matrix
@@ -243,7 +243,7 @@ module Cucumber
243
243
  col += 1
244
244
  @cell_class.new(raw_cell, self, row, col, line)
245
245
  end
246
- end
246
+ end.freeze
247
247
  end
248
248
 
249
249
  # Represents a row of cells or columns of cells
@@ -268,7 +268,7 @@ module Cucumber
268
268
  end
269
269
 
270
270
  def to_hash #:nodoc:
271
- @to_hash ||= @table.to_hash(self)
271
+ @to_hash ||= @table.to_hash(self).freeze
272
272
  end
273
273
 
274
274
  def value(n) #:nodoc:
@@ -326,7 +326,7 @@ module Cucumber
326
326
  private
327
327
 
328
328
  def col_width
329
- @col_width ||= @table.__send__(:col_width, @col)
329
+ @col_width ||= @table.__send__(:col_width, @col).freeze
330
330
  end
331
331
  end
332
332
  end
@@ -3,7 +3,7 @@ module Cucumber #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 3
5
5
  TINY = 11
6
- PATCH = nil # Set to nil for official release
6
+ PATCH = 1 # Set to nil for official release
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aslakhellesoy-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.11
4
+ version: 0.3.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Aslak Helles\xC3\xB8y"