From: Yukihiro Matsumoto Date: 2006-06-26T11:21:59+09:00 Subject: Re: Unicode roadmap? Hi, In message "Re: Unicode roadmap?" on Mon, 26 Jun 2006 10:22:15 +0900, "Phillip Hutchings" writes: |> st = File.open("file.txt", "rb") { |f| f.read_string } |> bv = File.open("file.txt", "rb") { |f| f.read_bytes } | |Why? This looks needlessly complex. | |string = File.open('file.txt', 'r') {f.read.to_s(:utf-8)} | |Or possibly |string = File.open('file.txt', 'r') {f.read(:utf8)} |bytes = File.open('file.txt', 'r') {f.read(:bytearray)} They are equally more complex than the current design. If File can return String or ByteArray, why shouldn't String with "no encoding" behave as sequence of bytes instead of separating? Are there any specific operations that should be in ByteArray but not in String, or vise versa? matz.