[ruby-cvs:67481] usa:r60300 (trunk): The encoding of __FILE__ and __dir__ should be same

usa at ruby-lang.org usa at ruby-lang.org
Sun Oct 22 00:43:05 JST 2017


usa	2017-10-22 00:43:05 +0900 (Sun, 22 Oct 2017)

  New Revision: 60300

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60300

  Log:
    The encoding of __FILE__ and __dir__ should be same
    
    * ruby.c (process_options): convert the real path of the script to locale
      encoding if its encoding is not locale (maybe UTF-8) on Windows/OS X.
      this change makes the encoding of __dir__ to the same encoding of __FILE__
      when the script name is passed from commandline.
    
    * test/ruby/test_options.rb (test___dir__encoding): test for this change.

  Modified files:
    trunk/ruby.c
    trunk/test/ruby/test_rubyoptions.rb


More information about the ruby-cvs mailing list