YUKI Hiroshi
yuki****@clear*****
Wed Dec 11 19:40:43 JST 2013
おお。。。そういうことであれば了解です。お手数をおかけしました。 (2013/12/11 18:51), Kouhei Sutou wrote: > In <52A7BC40.6080206 �� clear-code.com> > "Re: [Groonga-commit] droonga/drntest �� 3ddb519 [master] Ignore JSON pretty print error on formatting for diff" on Wed, 11 Dec 2013 10:13:36 +0900, > YUKI Hiroshi <yuki �� clear-code.com> wrote: > >> これなんですが、expectedのJSONが壊れているときに、それが分かりやすく >> なってるといいなあということでrescueしてpしていた次第です。 >> その点の懸念は解消されているとみてよいのでしょうか、それとも、エラーのあ >> るJSONをリポジトリに入れることの方が作業の進め方としてあり得ないというこ >> とになりますでしょうか? > > 解消されています。 > というか、ここのコードって、expectedのJSONが壊れているときに > は到達しないコードなんです。expectedのJSONが壊れているときは、 > ここじゃないJSONを読み込む処理でエラーが報告されるので、ここ > のオブジェクトをJSON的に整形している処理とはまた別なのです。 > > で、JSONを読み込む処理のところは、よりわかりやすく表示するよ > うに変更していたのでした。 > > https://github.com/droonga/drntest/commit/ea071293aa3f68c551cad4124971c92e9acba2b1#diff-4b8aadc0d4ce7e1d96dd42ca3f314759R41 > >> Kouhei Sutou wrote: >>> Author >>> Kouhei Sutou <kou �� clear-code.com> >>> Date >>> 2013-12-10 19:15:16 +0900 (Tue, 10 Dec 2013) >>> New Revision >>> 3ddb5196569f2db7b1cc50158259866b6bd52e8d >>> <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d> >>> Message >>> >>> Ignore JSON pretty print error on formatting for diff >>> >>> Because it is meaningless information. We do it just for showing >>> readable diff. If the error improves diff readability, we use it. But >>> it doesn't. >>> >>> Modified files >>> >>> * lib/drntest/test-runner.rb >>> <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#diff-0> >>> >>> Modified: lib/drntest/test-runner.rb (+2 -3) >>> =================================================================== >>> >>> ... <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0L237> >>> 238 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0L238> >>> 239 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0L239> >>> 240 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0L240> >>> 241 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0L241> >>> 242 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0L242> >>> 243 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0L243> >>> >>> >>> 244 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0L244> >>> 245 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0L245> >>> 246 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0L246> >>> >>> >>> >>> ... <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0R237> >>> 238 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0R238> >>> 239 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0R239> >>> 240 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0R240> >>> >>> >>> >>> 241 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0R241> >>> 242 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0R242> >>> 243 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0R243> >>> 244 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0R244> >>> 245 <https://github.com/droonga/drntest/commit/3ddb5196569f2db7b1cc50158259866b6bd52e8d#L0R245> >>> >>> >>> >>> @@ -238,9 +238,8 @@module Drntest >>> def format_result(result) >>> begin >>> JSON.pretty_generate(result) >>> - rescue JSON::GeneratorError => error >>> - p error >>> - p result >>> + rescue JSON::GeneratorError >>> + result >>> end >>> end >>> >>> >>> >>> >>> _______________________________________________ >>> Groonga-commit mailing list >>> Groonga-commit �� lists.sourceforge.jp >>> http://lists.sourceforge.jp/mailman/listinfo/groonga-commit >>> >> >> -- >> 結城 洋志 <YUKI Hiroshi> >> E-mail: yuki �� clear-code.com >> >> 株式会社クリアコード >> 〒113-0033 東京都文京区本郷3-27-12 >> 本郷デントビル2階 >> TEL : 03-6231-7270 >> FAX : 03-6231-7271 >> WWW : http://www.clear-code.com/ >> >> _______________________________________________ >> Groonga-commit mailing list >> Groonga-commit �� lists.sourceforge.jp >> http://lists.sourceforge.jp/mailman/listinfo/groonga-commit > > _______________________________________________ > Groonga-commit mailing list > Groonga-commit �� lists.sourceforge.jp > http://lists.sourceforge.jp/mailman/listinfo/groonga-commit > -- 結城 洋志 <YUKI Hiroshi> E-mail: yuki �� clear-code.com 株式会社クリアコード 〒113-0033 東京都文京区本郷3-27-12 本郷デントビル2階 TEL : 03-6231-7270 FAX : 03-6231-7271 WWW : http://www.clear-code.com/