arrayfields 4.3.0 → 4.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +3 -0
- data/README.tmpl +3 -0
- data/a.rb +7 -7
- data/lib/{arrayfields-4.3.0.rb → arrayfields-4.4.0.rb} +11 -2
- data/lib/arrayfields.rb +11 -2
- metadata +2 -2
data/README
CHANGED
data/README.tmpl
CHANGED
data/a.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'arrayfields'
|
3
|
-
puts "ruby version : #{RUBY_VERSION}"
|
4
|
-
puts "gems version : #{Gem::RubyGemsVersion}"
|
5
|
-
puts "arrayfields version : #{ArrayFields::VERSION}"
|
6
|
-
require 'rake'
|
7
|
-
puts 42
|
1
|
+
require 'rubygems'
|
2
|
+
require 'arrayfields'
|
3
|
+
puts "ruby version : #{RUBY_VERSION}"
|
4
|
+
puts "gems version : #{Gem::RubyGemsVersion}"
|
5
|
+
puts "arrayfields version : #{ArrayFields::VERSION}"
|
6
|
+
require 'rake'
|
7
|
+
puts 42
|
8
8
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# Array#fields= is called
|
6
6
|
#
|
7
7
|
module ArrayFields
|
8
|
-
self::VERSION = '4.
|
8
|
+
self::VERSION = '4.4.0' unless defined? self::VERSION
|
9
9
|
def self.version() VERSION end
|
10
10
|
#
|
11
11
|
# multiton cache of fields - wraps fields and fieldpos map to save memory
|
@@ -250,10 +250,19 @@
|
|
250
250
|
alias_method 'pairs', 'to_pairs'
|
251
251
|
|
252
252
|
def copy
|
253
|
-
cp = clone
|
253
|
+
cp = clone
|
254
254
|
cp.fields = fields.clone
|
255
255
|
cp
|
256
256
|
end
|
257
|
+
|
258
|
+
alias_method 'dup', 'copy'
|
259
|
+
alias_method 'clone', 'copy'
|
260
|
+
|
261
|
+
def deepcopy
|
262
|
+
cp = Marshal.load(Marshal.dump(self))
|
263
|
+
cp.fields = Marshal.load(Marshal.dump(self.fields))
|
264
|
+
cp
|
265
|
+
end
|
257
266
|
end
|
258
267
|
Arrayfields = ArrayFields
|
259
268
|
|
data/lib/arrayfields.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
# Array#fields= is called
|
6
6
|
#
|
7
7
|
module ArrayFields
|
8
|
-
self::VERSION = '4.
|
8
|
+
self::VERSION = '4.4.0' unless defined? self::VERSION
|
9
9
|
def self.version() VERSION end
|
10
10
|
#
|
11
11
|
# multiton cache of fields - wraps fields and fieldpos map to save memory
|
@@ -250,10 +250,19 @@
|
|
250
250
|
alias_method 'pairs', 'to_pairs'
|
251
251
|
|
252
252
|
def copy
|
253
|
-
cp = clone
|
253
|
+
cp = clone
|
254
254
|
cp.fields = fields.clone
|
255
255
|
cp
|
256
256
|
end
|
257
|
+
|
258
|
+
alias_method 'dup', 'copy'
|
259
|
+
alias_method 'clone', 'copy'
|
260
|
+
|
261
|
+
def deepcopy
|
262
|
+
cp = Marshal.load(Marshal.dump(self))
|
263
|
+
cp.fields = Marshal.load(Marshal.dump(self.fields))
|
264
|
+
cp
|
265
|
+
end
|
257
266
|
end
|
258
267
|
Arrayfields = ArrayFields
|
259
268
|
|
metadata
CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: arrayfields
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 4.
|
6
|
+
version: 4.4.0
|
7
7
|
date: 2007-09-18 00:00:00 -06:00
|
8
8
|
summary: arrayfields
|
9
9
|
require_paths:
|
@@ -34,7 +34,7 @@ files:
|
|
34
34
|
- gen_readme.rb
|
35
35
|
- install.rb
|
36
36
|
- lib
|
37
|
-
- lib/arrayfields-4.
|
37
|
+
- lib/arrayfields-4.4.0.rb
|
38
38
|
- lib/arrayfields.rb
|
39
39
|
- README
|
40
40
|
- README.tmpl
|