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.3:
Range#stepbehavior change to become more useful for non-numeric iteration.
- Ruby 3.2:
- Ruby 3.1:
- Ruby 3.0:
- Ruby 2.7:
Comparambe#clampwith a range:1.clamp(0..100),1.clamp(5..),1.clamp(..18)Enumerator#produce- Beginless range
Method#inspect- ~
Date#inspectsimplified~ (reverted)
- Ruby 2.6:
Kernel#thenas a synonym (better name) for#yield_self(context)Enumerable#chainRange#===to usecover?instead ofinclude?CSV::Row#each_pairfor compatibility withOpenStruct
Pending
- Make a concept of “consuming enumerator” explicit
Enumerator::Lazy#partitionEnumerable#take_while_afterDir#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::Bufferreviews/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#thenin 2.6
Minor clarifications and bugs
- 3.2
Range#include?inconsistency for beginlessStringranges - 3.1 Necessity of
require 'fiber' - 3.0
Object.clone(freeze: true) - 2.7 Deprecate
Kernel#openprovided byopen-uriin favor of more explicitURI.open - 2.7
Time#dst?bug for time with real timezone - 2.7
IO#set_encoding_by_bomraising on already set encoding StringIO#internal_encodingis broken
Documenting Ruby
Merged
- Ruby 3.3:
- Ruby 3.2:
- Ruby 3.1:
- Add documentation for new hash value omission syntax
- Add documentation for new
Refinementclass - Improve
Thread::Queue.newdocs - Fix
StructClass::class method docs Fiber::SchedulerInterface#io_readand#io_writeIO::Buffer: 1, 2Thread::Backtrace.limit- Fix
String#unpackand#unpack1docs - Document
Marshal#loadparameterfreeze:
- 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 - A group of small fixes in 3.0 core docs
- JSON: hide irrelevant parts of docs
- JSON: enhance generic
JSONand#generatedocs
- Ruby 2.7:
Kernel#system(exception: true)NoMethodError/NameErrornew argumentsKernel#BigDecimal(exception: false)BigDecimal::Jacobian– fix invisible docsTracePoint#enableEnumerator::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,rescuein blocks, better docs forchomp:option,Object#to_enum,Proc#>>and#<<,Processmodule - Matrix: slightly enhance docs
- group of stdlib documentation fixes: ERB, StringIO, IRB, Net::FTP, open-uri, OptionParser, Net::HTTP
Bundlerentire 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_selfMethodYAML(explanation of aliasing toPsych)MatchDataProcEndless rangeInteger(exception: false)and othersTempfilePsych#dumpCSV: redesign main class docs