mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
2 changed files with 8 additions and 1 deletions
|
@ -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>
|
||||
|
||||
* lib/rubygems/ext/cmake_builder.rb: Added a builder for cmake.
|
||||
|
|
|
@ -8,9 +8,10 @@ module IRB
|
|||
line = io.gets
|
||||
line = io.gets if line[0,2] == "#!"
|
||||
encoding = detect_encoding(line)
|
||||
internal_encoding = encoding
|
||||
encoding ||= default_src_encoding
|
||||
io.rewind
|
||||
io.set_encoding(encoding, nil)
|
||||
io.set_encoding(encoding, internal_encoding)
|
||||
|
||||
if block_given?
|
||||
begin
|
||||
|
|
Loading…
Reference in a new issue