Project

General

Profile

Actions

環境対応 #661

closed

Windowsで日本語を含むパスのmikutter.rbを"ruby mikutter.rb"で起動すると落ちる。

Added by Satoshi Okuno over 10 years ago. Updated over 10 years ago.

Status:
却下
Priority:
通常
Assignee:
Target version:
Start date:
2014-05-06
Due date:
% Done:

0%

プラグイン名:

Description

Windowsにて、mikutter.rbのmikutter_directoryの取得処理で、一定の条件を満たすとパスの文字列が化ける問題が有ります。

mikutter_directory = File.expand_path(File.dirname(FILE).force_encoding(Encoding.default_external))

RubyのFile.dirname()にバグが有り、引数の内容によって戻り値の文字列のエンコーディングが変わるのが問題の様です。

引数 -> 戻り値のエンコーディング > その結果
"mikutter.rb" -> US-ASCII > File.expant_pathがSJIS部分を"?"に置換して以降の処理でこける。
"./mikutter.rb"他、ディレクトリを含む物 -> Windows-31J(SJIS) ==> 正常動作

本件、RubyのIssueを見ると2.2.0で直るとの事です。

差し当たってポータブルな回避パッチを作りましたので、マージご検討頂きたく。
(WindowsとMacで動作確認実施。)

上記に関連して、同ファイルのENV['BUNDLE_GEMFILE']をmikutter_directoryを元に構築する様に変更しています。
併せてご確認下さい。


Files

001-Windows-ruby-mikutter.patch (1.68 KB) 001-Windows-ruby-mikutter.patch Satoshi Okuno, 2014-05-06 09:19

Related issues

Related to 環境対応 #667: Windowsで日本語を含むパスのmikutterを起動した場合、notice、logなどで例外が発生する。却下2014-05-09

Actions
Actions

Also available in: Atom PDF