Closed jeffmax closed 11 years ago
Looks reasonable. I wonder though, why I haven't seen this before, even on ruby 1.9.2. Could you give me a failing spec example?
Turns out I should actually check things out before I open my mouth. When actually executing the spec on my 1.9.2 version I actually had some failures. However, I think they were unrelated to this issue, and they have been fixed in the current master branch.
I would still love to see how this fails though, so we can add a spec example and prevent future regressions.
Chris,
I am trying to recreate this, but as of right now I can only make it happen when I am running inside of a Rack application. I have no idea why this would be the case, but the traceback is:
invalid byte sequence in US-ASCII
0 /home/vagrant/.rvm/gems/ruby-1.9.2-p320/gems/dicom-0.9.4/lib/dicom/d_library.rb 209 in split' 1 /home/vagrant/.rvm/gems/ruby-1.9.2-p320/gems/dicom-0.9.4/lib/dicom/d_library.rb 209 in
load_element'
2 /home/vagrant/.rvm/gems/ruby-1.9.2-p320/gems/dicom-0.9.4/lib/dicom/d_library.rb 28 in block in initialize' 3 /home/vagrant/.rvm/gems/ruby-1.9.2-p320/gems/dicom-0.9.4/lib/dicom/d_library.rb 27 in
each'
4 /home/vagrant/.rvm/gems/ruby-1.9.2-p320/gems/dicom-0.9.4/lib/dicom/d_library.rb 27 in initialize' 5 /home/vagrant/.rvm/gems/ruby-1.9.2-p320/gems/dicom-0.9.4/lib/dicom/constants.rb 118 in
new'
6 /home/vagrant/.rvm/gems/ruby-1.9.2-p320/gems/dicom-0.9.4/lib/dicom/constants.rb 118 in ' 7 /home/vagrant/.rvm/gems/ruby-1.9.2-p320/gems/dicom-0.9.4/lib/dicom/constants.rb 1 in
'
8 /home/vagrant/.rvm/gems/ruby-1.9.2-p320/gems/dicom-0.9.4/lib/dicom.rb 43 in `require_relative'
9 /home/vagrant/.rvm/gems/ruby-1.9.2-p320/gems/dicom-0.9.4/lib/dicom.rb
I will continue to look into this.
Jeff
Merged. Thanks for the contribution!
There are some non-ascii characters in dictionary text (0018,1153 Exposure in µAs IS 1). This is causing an error for me in ruby 1.9.2. This specifies the encoding as the file is read.