* lib/irb/magic-file.rb: set a encoding, which is detected from
the file to read, to the internal encoding. [Bug #4281][ruby-dev:43036] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cf7ca7e66d
commit
f04dd0f08b
@ -1,3 +1,9 @@
|
|||||||
|
Mon Dec 10 10:36:12 2012 Narihiro Nakamura <authornari@gmail.com>
|
||||||
|
|
||||||
|
* lib/irb/magic-file.rb: set a encoding, which is detected from
|
||||||
|
the file to read, to the internal encoding.
|
||||||
|
[Bug #4281][ruby-dev:43036]
|
||||||
|
|
||||||
Mon Dec 10 09:40:19 2012 Eric Hodel <drbrain@segment7.net>
|
Mon Dec 10 09:40:19 2012 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
* lib/rubygems/ext/cmake_builder.rb: Added a builder for cmake.
|
* lib/rubygems/ext/cmake_builder.rb: Added a builder for cmake.
|
||||||
|
@ -8,9 +8,10 @@ module IRB
|
|||||||
line = io.gets
|
line = io.gets
|
||||||
line = io.gets if line[0,2] == "#!"
|
line = io.gets if line[0,2] == "#!"
|
||||||
encoding = detect_encoding(line)
|
encoding = detect_encoding(line)
|
||||||
|
internal_encoding = encoding
|
||||||
encoding ||= default_src_encoding
|
encoding ||= default_src_encoding
|
||||||
io.rewind
|
io.rewind
|
||||||
io.set_encoding(encoding, nil)
|
io.set_encoding(encoding, internal_encoding)
|
||||||
|
|
||||||
if block_given?
|
if block_given?
|
||||||
begin
|
begin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user