[#104004] [Ruby master Feature#17883] Load bundler/setup earlier to make `bundle exec ruby -r` respect Gemfile — mame@...
Issue #17883 has been reported by mame (Yusuke Endoh).
21 messages
2021/05/24
[ruby-core:103898] [Ruby master Feature#17210] More readable and useful `Set#inspect`
From:
universato@...
Date:
2021-05-19 22:12:32 UTC
List:
ruby-core #103898
Issue #17210 has been updated by universato (Yoshimine Sato).
+1
I second the proposal.
```ruby
p [1, 2, 3] #=> [1, 2, 3]
p "hello" #=> "hello"
p 1.0 #=> 1.0
p({"x"=>1}) #=> {"x"=>1}
p 1..2 #=> 1..2
p nil #=> nil
p true #=> true
p :name #=> :name
p Array #=> Array
require "matrix"
p Matrix[[1, 2], [3, 4]]
p Vector[1, 2]
```
The output of the major classes equal to Ruby code(literal or syntax sugar).
It is very useful and readable.
----------------------------------------
Feature #17210: More readable and useful `Set#inspect`
https://bugs.ruby-lang.org/issues/17210#change-92022
* Author: marcandre (Marc-Andre Lafortune)
* Status: Open
* Priority: Normal
* Assignee: knu (Akinori MUSHA)
----------------------------------------
I would like to change `Set#inspect`/`to_s`:
```ruby
# before
puts Set[1,2,3] # => "#<Set: {1, 2, 3}>"
# after
puts Set[1,2,3] # => "Set[1, 2, 3]"
```
This output is shorter, readable, and has the property that it corresponds to Ruby code
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>