diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-12-12 14:58:58 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-12-12 14:58:58 -0500 |
commit | 1beb5aa3c376dbef89bc33024216650529ef7262 (patch) | |
tree | 1682500089c14fd49bcf52a3a001e291fadd5f75 /lib/sisu/v3/po4a.rb | |
parent | debian/changelog (3.3.2-1) (diff) | |
parent | v3: 3.3.3 version & changelog, dates touched (diff) |
Merge tag 'sisu_3.3.3' into debian/sid
Diffstat (limited to 'lib/sisu/v3/po4a.rb')
-rw-r--r-- | lib/sisu/v3/po4a.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sisu/v3/po4a.rb b/lib/sisu/v3/po4a.rb index 7ce825ee..53bab960 100644 --- a/lib/sisu/v3/po4a.rb +++ b/lib/sisu/v3/po4a.rb @@ -214,7 +214,7 @@ module SiSU_Po4a end desc="#{d}#{s_mark}#{instruct}" orig=(orig_notes[i].to_s =~/^\^~[\d*+]+/) ? (orig_notes[i].to_s.gsub(/^\^~[\d*+]+/,'^~')) : orig_notes[i].to_s - trans=if trn_notes.class==Array \ + trans=if trn_notes.is_a?(Array) \ and trn_notes.length==orig_notes.length (trn_notes[i].to_s =~/^\^~[\d*+]+/) ? (trn_notes[i].to_s.gsub(/^\^~[\d*+]+/,'^~')) : trn_notes[i].to_s else '' @@ -749,12 +749,12 @@ GSUB #next if data_trn[t].is == :comment end end - if (defined? data_src[s].ocn and data_src[s].ocn.class == Fixnum) \ - and (defined? data_trn[t].ocn and data_trn[t].ocn.class == Fixnum) \ + if (defined? data_src[s].ocn and data_src[s].ocn.is_a?(Fixnum)) \ + and (defined? data_trn[t].ocn and data_trn[t].ocn.is_a?(Fixnum)) \ and (data_src[s].ocn == data_trn[t].ocn) @m_s,@m_t=s,t - elsif (defined? data_src[s].ocn and data_src[s].ocn.class == Fixnum) \ - and (defined? data_trn[t].ocn and data_trn[t].ocn.class == Fixnum) \ + elsif (defined? data_src[s].ocn and data_src[s].ocn.is_a?(Fixnum)) \ + and (defined? data_trn[t].ocn and data_trn[t].ocn.is_a?(Fixnum)) \ and (data_src[s].ocn != data_trn[t].ocn) p '--- OCN ---' p 'mis-match' @@ -934,7 +934,7 @@ GSUB @sisu=[] emptyline=0 @content.each do |para| # this is a hack - if para.class==Array \ + if para.is_a?(Array) \ and para.length > 0 para.each do |line| if line |