Contributions to Ruby
List of my (zverok aka Victor Shepelev) contributions to discussing/changing of the Ruby programming language. It links to Ruby bug tracker discussions and GitHub PRs of things I’ve contributed and proposed and their current status. Rejected/ignored proposals are eventually removed from the list.
Ruby features
Accepted
- Ruby 3.2:
- Ruby 3.1:
- Ruby 3.0:
- Ruby 2.7:
Comparambe#clamp
with a range:1.clamp(0..100)
,1.clamp(5..)
,1.clamp(..18)
Enumerator#produce
- Beginless range
Method#inspect
- ~
Date#inspect
simplified~ (reverted)
- Ruby 2.6:
Kernel#then
as a synonym (better name) for#yield_self
(context)Enumerable#chain
Range#===
to usecover?
instead ofinclude?
CSV::Row#each_pair
for compatibility withOpenStruct
Pending
Hash#merge
: smarter protocol depending on passed block arity- Make a concept of “consuming enumerator” explicit
- Update of semantics for
Range#step
Enumerator::Lazy#partition
Enumerable#take_while_after
Dir#empty?
andFile#empty?
Object#non
Contributed to discussions
(The cases where I was not an author of initial proposal, but believe my contribution/pushing for solution was significant enough)
- 3.1:
IO::Buffer
reviews/proposals - 3.0:
Hash#except
2.7: Syntax sugar for method reference: seems(ugh, reverted).:
is finally accepted for 2.7- 2.5:
Kernel#yield_self
– I don’t like the name, but for several months pushed for “we should have this method, whatever name you choose” :) Then we renamed it to#then
in 2.6
Minor clarifications and bugs
- 3.2
Range#include?
inconsistency for beginlessString
ranges - 3.1 Necessity of
require 'fiber'
- 3.0
Object.clone(freeze: true)
- 2.7 Deprecate
Kernel#open
provided byopen-uri
in favor of more explicitURI.open
- 2.7
Time#dst?
bug for time with real timezone - 2.7
IO#set_encoding_by_bom
raising on already set encoding StringIO#internal_encoding
is broken
Documenting Ruby
Merged
- Ruby 3.2:
- Ruby 3.1:
- Add documentation for new hash value omission syntax
- Add documentation for new
Refinement
class - Improve
Thread::Queue.new
docs - Fix
StructClass::
class method docs Fiber::SchedulerInterface#io_read
and#io_write
IO::Buffer
: 1, 2Thread::Backtrace.limit
- Fix
String#unpack
and#unpack1
docs - Document
Marshal#load
parameterfreeze:
- Ruby 3.0:
- Full docs for non-blocking Fibers and scheduler
- New docs for
Fiber.transfer
- Full class- and method-level docs for Ractors
- Update method definition docs to include
...
and one-line methods - group of small fixes in 3.0 core docs
- JSON: hide irrelevant parts of docs
- JSON: enhance generic
JSON
and#generate
docs
- Ruby 2.7:
Kernel#system(exception: true)
NoMethodError
/NameError
new argumentsKernel#BigDecimal(exception: false)
BigDecimal::Jacobian
– fix invisible docsTracePoint#enable
Enumerator::Lazy
- fileutils: facelift module docs and fix some bugs;
- group of small fixes of formatting in core docs
- group of larger fixes: toplevel
return
, full comments syntax explanation,rescue
in blocks, better docs forchomp:
option,Object#to_enum
,Proc#>>
and#<<
,Process
module - Matrix: slightly enhance docs
- group of stdlib documentation fixes: ERB, StringIO, IRB, Net::FTP, open-uri, OptionParser, Net::HTTP
Bundler
entire stdlib- Webrick: document Proc body for Response
- Numbered block parameters
- Small final pre-2.7 changes
Module#const_source_location
- ~
RubyVM.resolve_feature_path
~ (the feature is moved to$LOAD_PATH
) - Pattern matching
- Ruby 2.6:
&.
Kernel#yield_self
Method
YAML
(explanation of aliasing toPsych
)MatchData
Proc
Endless range
Integer(exception: false)
and othersTempfile
Psych#dump
CSV
: redesign main class docs