{"id":15032935,"url":"https://github.com/ruby/weakref","last_synced_at":"2025-04-04T10:08:33.787Z","repository":{"id":42977428,"uuid":"200771176","full_name":"ruby/weakref","owner":"ruby","description":"Weak Reference class that allows a referenced object to be garbage-collected.","archived":false,"fork":false,"pushed_at":"2025-02-03T01:58:42.000Z","size":96,"stargazers_count":14,"open_issues_count":3,"forks_count":7,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-03-28T09:08:20.838Z","etag":null,"topics":["ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-06T03:41:02.000Z","updated_at":"2025-02-03T01:58:46.000Z","dependencies_parsed_at":"2025-01-30T21:10:59.625Z","dependency_job_id":"dec5f46b-d6c9-493f-af6d-a1558f7d5e1b","html_url":"https://github.com/ruby/weakref","commit_stats":{"total_commits":73,"total_committers":20,"mean_commits":3.65,"dds":0.7123287671232876,"last_synced_commit":"5b5f79d8a6981a16ae556095b770c1bb5b649f48"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fweakref","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fweakref/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fweakref/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fweakref/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby","download_url":"https://codeload.github.com/ruby/weakref/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157283,"owners_count":20893220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ruby"],"created_at":"2024-09-24T20:19:46.709Z","updated_at":"2025-04-04T10:08:33.765Z","avatar_url":"https://github.com/ruby.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weakref\n\nWeak Reference class that allows a referenced object to be\ngarbage-collected.\n\nA WeakRef may be used exactly like the object it references.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'weakref'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install weakref\n\n## Usage\n\n```ruby\nfoo = Object.new            # create a new object instance\np foo.to_s                  # original's class\nfoo = WeakRef.new(foo)      # reassign foo with WeakRef instance\np foo.to_s                  # should be same class\nGC.start                    # start the garbage collector\np foo.to_s                  # should raise exception (recycled)\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ruby/weakref.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fweakref","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby%2Fweakref","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fweakref/lists"}