[ruby-core:63861] [ruby-trunk - Feature #10058] [PATCH] Fix some coding styles

From: qlli.illb@...
Date: 2014-07-19 08:01:30 UTC
List: ruby-core #63861
Issue #10058 has been updated by gogo tanaka.


@ Mr. Marc-Andre Lafortune

> Even though it can be a pain, please split unrelated patches in different requests.

Sorry, I'm not familiar with how to use redmine. so you mean I need to make new 2 features?

(About unify_product_operator.patch,  about reorder_Matrix#real_and_Matrix_imaginary.patch)

> 2) I reorder methods. I think Matrix#real should be upon Matrix#imaginary
> 
> Methods are sorted alphabetically within sections. I believe this was the original convention when I became committer. I see no compelling reason to change this.
> 

OK, I got your point. I will try that from now.


@ Naohisa Gotoさん

承知致しました. なるほど、今回のようにとりわけ理由がなければ `__send__`を使うべきであると言う事はよくわかりました.

一つ賢くなれました. ご鞭撻ありがとうございました!

&& と andの優先順位についてもありがとうございました.

----------------------------------------
Feature #10058: [PATCH] Fix some coding styles
https://bugs.ruby-lang.org/issues/10058#change-47887

* Author: gogo tanaka
* Status: Open
* Priority: Low
* Assignee: Marc-Andre Lafortune
* Category: 
* Target version: 
----------------------------------------
When I read codes, I notice some issues about coding style.

If you don't mind that, you can ignore my patches. It's just coding style problem.

コードを読んでいる中でコーディングスタイルに関して気になる事があったのでPATCHを投げますが、

こちら(redmine, rubyコミュニティ)のコーディングスタイルに対する温度感が掴めてないので

気にする事でなければ、無視してください. 

あげると切りがないので今回は特に気になる以下の三点に絞りました. 

* There are both `&&` and `and`. So, I Unify with `&&` 

* There are both `send :xxx` and `send(:xxx)`  expressions. So, I Unify with `send(:xxx)` 

*  I reorder methods. I think Matrix#real should be upon Matrix#imaginary(From what I see complex.c)

---Files--------------------------------
unify_product_operator.patch (879 Bytes)
reorder_Matrix#real_and_Matrix_imaginary.patch (1.3 KB)
use_method_with_parenthesis.patch (1021 Bytes)


-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next