excelsior 0.0.6 → 0.0.7

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/Rakefile CHANGED
@@ -8,7 +8,7 @@ PKG_FILES = %w(Rakefile) +
8
8
 
9
9
  gem_spec = Gem::Specification.new do |gem_spec|
10
10
  gem_spec.name = 'excelsior'
11
- gem_spec.version = '0.0.6'
11
+ gem_spec.version = '0.0.7'
12
12
  gem_spec.summary = 'A Ruby gem that uses C bindings to read CSV files superfast. I\'m totally serial!'
13
13
  gem_spec.description = 'A Ruby gem that uses C bindings to read CSV files superfast. I\'m totally serial!'
14
14
  gem_spec.email = 'matt@toastyapps.com'
@@ -238,7 +238,7 @@ _eof_trans:
238
238
  break;
239
239
  case 7:
240
240
  #line 17 "excelsior_reader.rl"
241
- {te = p+1;{ rb_yield(arr); arr = rb_ary_new(); has_found = 0; }}
241
+ {te = p+1;{ if(has_found ==0) rb_ary_push(arr, Qnil); rb_yield(arr); arr = rb_ary_new(); has_found = 0; }}
242
242
  break;
243
243
  case 8:
244
244
  #line 21 "excelsior_reader.rl"
@@ -246,7 +246,7 @@ _eof_trans:
246
246
  break;
247
247
  case 9:
248
248
  #line 17 "excelsior_reader.rl"
249
- {te = p;p--;{ rb_yield(arr); arr = rb_ary_new(); has_found = 0; }}
249
+ {te = p;p--;{ if(has_found ==0) rb_ary_push(arr, Qnil); rb_yield(arr); arr = rb_ary_new(); has_found = 0; }}
250
250
  break;
251
251
  case 10:
252
252
  #line 20 "excelsior_reader.rl"
@@ -7,18 +7,18 @@ int has_found = 0;
7
7
 
8
8
  %%{
9
9
  machine excelsior_scan;
10
- delimeter = ",";
11
- newline = "\r"? "\n" | "\r" | "\n";
12
- schar = any - '"';
13
- letter = any - delimeter - '"' - newline;
14
- string = '"' (schar | '""')* '"' ;
10
+ delimiter = ",";
11
+ newline = "\r"? "\n" | "\r";
12
+ string_character = any - '"';
13
+ letter = string_character - delimiter - newline;
14
+ string = '"' (string_character | '""')* '"' ;
15
15
  value = letter+;
16
16
  main := |*
17
- newline { rb_yield(arr); arr = rb_ary_new(); has_found = 0; };
17
+ newline { if(has_found ==0) rb_ary_push(arr, Qnil); rb_yield(arr); arr = rb_ary_new(); has_found = 0; };
18
18
  space;
19
19
  value { rb_ary_push(arr, rb_str_new(ts, te - ts)); has_found = 1;};
20
20
  string { rb_ary_push(arr, rb_str_new(ts + 1, te - ts - 2)); has_found = 1;};
21
- delimeter { if(has_found == 0) rb_ary_push(arr, Qnil); has_found = 0;};
21
+ delimiter { if(has_found == 0) rb_ary_push(arr, Qnil); has_found = 0;};
22
22
  *|;
23
23
  }%%
24
24
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excelsior
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Mongeau
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-24 00:00:00 -04:00
12
+ date: 2009-12-09 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -51,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  requirements: []
52
52
 
53
53
  rubyforge_project:
54
- rubygems_version: 1.3.4
54
+ rubygems_version: 1.3.5
55
55
  signing_key:
56
56
  specification_version: 3
57
57
  summary: A Ruby gem that uses C bindings to read CSV files superfast. I'm totally serial!