[#64517] Fw: Re: Ruby and Rails to become Apache Incubator Project — Tetsuya Kitahata <[email protected]>

What do you think? >> Ruby developers

13 messages 2014/08/23

[#64615] [ruby-trunk - Feature #10181] [Open] New method File.openat() — oss-ruby-lang@...

Issue #10181 has been reported by Technorama Ltd..

10 messages 2014/08/28
[#64616] Re: [ruby-trunk - Feature #10181] [Open] New method File.openat() — Eric Wong <normalperson@...> 2014/08/28

I like this feature.

[#64671] Fwd: [ruby-changes:35240] normal:r47322 (trunk): symbol.c (rb_sym2id): do not return garbage object — SASADA Koichi <ko1@...>

Why this fix solve your problem?

9 messages 2014/08/30
[#64672] Re: Fwd: [ruby-changes:35240] normal:r47322 (trunk): symbol.c (rb_sym2id): do not return garbage object — SASADA Koichi <ko1@...> 2014/08/30

(2014/08/30 8:50), SASADA Koichi wrote:

[ruby-core:64551] [ruby-trunk - Feature #10168] [Open] Native Object#inspect method should single quote strings that don't need to be double quoted

From: pghalliday@...
Date: 2014-08-25 15:26:20 UTC
List: ruby-core #64551
Issue #10168 has been reported by Peter Halliday.

----------------------------------------
Feature #10168: Native Object#inspect method should single quote strings that don't need to be double quoted
https://bugs.ruby-lang.org/issues/10168

* Author: Peter Halliday
* Status: Open
* Priority: Normal
* Assignee: 
* Category: core
* Target version: current: 2.2.0
----------------------------------------
When these strings get printed, copied and pasted into source code, RuboCop will complain, eg:

    spec/recipes/default_spec.rb:23:24: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
        stub_data_bag_item("jenkins-cluster", "default").and_return(
                           ^^^^^^^^^^^^^^^^^

which resulted from the following code

    signature = "#{type}(#{options[:args].map(&:inspect).join(', ')})"


If we believe that the default rules for RuboCop are good then it seems to me that they should be applied by Ruby where appropriate. In this case the strings should be single quoted.

From my point of view this is a suggestion to increase overall productivity as I use tools that use this method to print things that I then copy and paste quite a bit - not having to then replace the quotes will save me time. Not using or always changing the defaults for RuboCop seems to be the wrong approach



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

In This Thread

Prev Next