mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/csv.rb (CSV::IOReader#initialize): use String#[](pos, len)
instead of String#[](idx) to check utf BOM. follows String#[](idx) behavior change of 1.9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f7429344aa
commit
97c6bc5ffd
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Sat Sep 2 12:00:32 2006 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/csv.rb (CSV::IOReader#initialize): use String#[](pos, len)
|
||||||
|
instead of String#[](idx) to check utf BOM. follows String#[](idx)
|
||||||
|
behavior change of 1.9.
|
||||||
|
|
||||||
Fri Sep 1 22:07:04 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Fri Sep 1 22:07:04 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* ruby.h (RSTRING_EMBED_LEN_MASK): uses 5 bits to support 64bit
|
* ruby.h (RSTRING_EMBED_LEN_MASK): uses 5 bits to support 64bit
|
||||||
|
|
|
@ -599,7 +599,7 @@ class CSV
|
||||||
@rs = rs
|
@rs = rs
|
||||||
@dev = CSV::IOBuf.new(@io)
|
@dev = CSV::IOBuf.new(@io)
|
||||||
@idx = 0
|
@idx = 0
|
||||||
if @dev[0] == 0xef and @dev[1] == 0xbb and @dev[2] == 0xbf
|
if @dev[0, 3] == "\xef\xbb\xbf"
|
||||||
@idx += 3
|
@idx += 3
|
||||||
end
|
end
|
||||||
@close_on_terminate = false
|
@close_on_terminate = false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue