{"id":19063228,"url":"https://github.com/delner/ruby_quirks","last_synced_at":"2026-06-12T21:31:47.549Z","repository":{"id":56893651,"uuid":"46080794","full_name":"delner/ruby_quirks","owner":"delner","description":"Hotfixes and common idioms for the Ruby language.","archived":false,"fork":false,"pushed_at":"2016-05-21T18:35:29.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-01T12:15:19.932Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/delner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-12T21:05:12.000Z","updated_at":"2016-05-21T18:35:30.000Z","dependencies_parsed_at":"2022-08-20T16:10:40.901Z","dependency_job_id":null,"html_url":"https://github.com/delner/ruby_quirks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/delner/ruby_quirks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delner%2Fruby_quirks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delner%2Fruby_quirks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delner%2Fruby_quirks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delner%2Fruby_quirks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delner","download_url":"https://codeload.github.com/delner/ruby_quirks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delner%2Fruby_quirks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34263869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T00:29:20.450Z","updated_at":"2026-06-12T21:31:45.168Z","avatar_url":"https://github.com/delner.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ruby Quirks\n===========\n\n[![Build Status](https://travis-ci.org/delner/ruby_quirks.svg?branch=master)](https://travis-ci.org/delner/ruby_quirks) ![Gem Version](https://img.shields.io/gem/v/ruby_quirks.svg?maxAge=2592000)\n###### *For Ruby 1.9.3, 2.0.x, 2.1.x, 2.2.x*\n\n### Introduction\n\n`ruby_quirks` is a gem which adds a collection of optional Ruby hotfixes and common idioms to accommodate for some of Ruby's quirky behaviors. See the list below to see what's offered.\n\n### Hotfixes\n\n#### Hash#reject and Hash#select returns Hash for subclasses of Hash\n\n - **For Ruby versions:** 2.2.0+\n - **Description:** Calling `#reject` or `#select` against an instance of a class that inherits from `Hash` will return an object of type `Hash`, rather than an object of the same type that `#reject` or `#select` was called against. e.g. This broke Rails' `HashWithIndifferentAccess`. See [this question](http://stackoverflow.com/questions/33638665/ruby-2-2-hashreject-returning-hash-for-inheriting-classes) for more details.\n - **What this hotfix does:** It overrides `#reject` and `#select` of implementing classes to use `#dup` to return an object of the same type. This effectively replicates pre-2.2 behavior of `Hash`.\n - **How to implement:** Include the `RubyQuirks::Hash::EnumByDup` in your class that inherits from `Hash`\n - **Example:**\n        \n        module CustomHash \u003c Hash\n          include RubyQuirks::Hash::EnumByDup\n        end\n\n### Changelog\n\n#### Version 0.0.2\n\n - Fixed: Namespace not loading (whoops!)\n\n#### Version 0.0.1\n\n - Initial version of Ruby Quirks\n - Added: `RubyQuirks::Hash::EnumByDup`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelner%2Fruby_quirks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelner%2Fruby_quirks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelner%2Fruby_quirks/lists"}