Changeset 98 for trunk/lib/linguistics/iso639.rb
- Timestamp:
- 01/29/08 23:01:39 (10 months ago)
- Files:
-
- 1 modified
-
trunk/lib/linguistics/iso639.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/linguistics/iso639.rb
r39 r98 19 19 # Read through the source for this file, capturing everything 20 20 # between __END__ and __END_DATA__ tokens. 21 in DataSection = false21 in_data_section = false 22 22 File::readlines( __FILE__ ).each {|line| 23 23 case line 24 24 when /^__END_DATA__$/ 25 in DataSection = false25 in_data_section = false 26 26 false 27 27 28 28 when /^__END__$/ 29 in DataSection = true29 in_data_section = true 30 30 false 31 31 32 32 else 33 if in DataSection33 if in_data_section 34 34 codes, desc = line[0,15].split(%r{/|\s+}), line[15...-1] 35 35 codes.delete_if {|code| code.empty?}
