1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/rdoc] Fix spelling error in parser comment

https://github.com/ruby/rdoc/commit/f237c9e223
This commit is contained in:
Dorian Marié 2020-07-08 01:07:56 +02:00 committed by aycabta
parent e23f0f29da
commit 0d56aec1dd

View file

@ -78,7 +78,7 @@ class RDoc::Parser
return true if s[0, 2] == Marshal.dump('')[0, 2] or s.index("\x00")
mode = 'r:utf-8' # default source encoding has been chagened to utf-8
mode = 'r:utf-8' # default source encoding has been changed to utf-8
s.sub!(/\A#!.*\n/, '') # assume shebang line isn't longer than 1024.
encoding = s[/^\s*\#\s*(?:-\*-\s*)?(?:en)?coding:\s*([^\s;]+?)(?:-\*-|[\s;])/, 1]
mode = "rb:#{encoding}" if encoding