Skip to content

Deep singleton class#1899

Closed
LTe wants to merge 3 commits intorubinius:masterfrom
LTe:deep_singleton_class
Closed

Deep singleton class#1899
LTe wants to merge 3 commits intorubinius:masterfrom
LTe:deep_singleton_class

Conversation

@LTe
Copy link
Copy Markdown
Contributor

@LTe LTe commented Sep 12, 2012

I removed check for sc->attached_instance(). We really need this check? Because this check break one spec from singleton_class_spec.rb

Also fixes #1886

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this before block really necessary?

Can't we just put it inside the it block? Since it's a single spec I think it's unnecessary to create a before block.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, updated

LTe added 3 commits September 12, 2012 21:02
Attach singleton class only when klass() of class is not a Singleton
Class.

Fixes #1886
@dbussink
Copy link
Copy Markdown
Contributor

Investigated where the original comment came from, it comes from #37. Did you try whether that still works properly with this change?

@LTe
Copy link
Copy Markdown
Contributor Author

LTe commented Sep 12, 2012

Unfortunately, returns a different value :(

A.cheese: edam
B.cheese: gouda
a.cheese: shropshire blue
b.cheese: cheddar
b_with_meta.cheese: cheshire
b_with_meta.metaclass.cheese: gouda
b_with_meta_meta.cheese: brie
b_with_meta_meta.metaclass.cheese: gouda
b_with_meta_meta.metaclass.metaclass.cheese: wensleydale

but should return

A.cheese: edam
B.cheese: stilton
a.cheese: shropshire blue
b.cheese: cheddar
b_with_meta.cheese: cheshire
b_with_meta.metaclass.cheese: stilton
b_with_meta_meta.cheese: brie
b_with_meta_meta.metaclass.cheese: gouda
b_with_meta_meta.metaclass.metaclass.cheese: wensleydale

Rubinius like gouda :)

@LTe
Copy link
Copy Markdown
Contributor Author

LTe commented Sep 12, 2012

@dbussink maybe test from #37 should be included to test-suite?

@dbussink
Copy link
Copy Markdown
Contributor

Ok, well, we can't go breaking stuff here. It does mean we probably need to have better specs to make sure this breakage would have shown up in the specs.

We probably shouldn't add them as specs 1 on 1 but try to make them as simple as possible

@LTe
Copy link
Copy Markdown
Contributor Author

LTe commented Sep 12, 2012

Ok, I will close this pull request for now and prepare better specs.

@LTe LTe closed this Sep 12, 2012
brixen added a commit that referenced this pull request Jan 16, 2018
Updating rubygems-update
Successfully installed rubygems-update-2.7.4
Installing RubyGems 2.7.4

=== 2.6.14 / 2017-10-09

Security fixes:

* Whitelist classes and symbols that are in loaded YAML.
  See CVE-2017-0903 for full details.
  Fix by Aaron Patterson.

=== 2.6.13 / 2017-08-27

Security fixes:

* Fix a DNS request hijacking vulnerability. (CVE-2017-0902)
  Discovered by Jonathan Claudius, fix by Samuel Giddins.
* Fix an ANSI escape sequence vulnerability. (CVE-2017-0899)
  Discovered by Yusuke Endoh, fix by Evan Phoenix.
* Fix a DOS vulnerability in the `query` command. (CVE-2017-0900)
  Discovered by Yusuke Endoh, fix by Samuel Giddins.
* Fix a vulnerability in the gem installer that allowed a malicious gem
  to overwrite arbitrary files. (CVE-2017-0901)
  Discovered by Yusuke Endoh, fix by Samuel Giddins.

=== 2.6.12 / 2017-04-30

Bug fixes:

* Fix test_self_find_files_with_gemfile to sort expected files. Pull
  request #1880 by Kazuaki Matsuo.
* Fix issue for MinGW / MSYS2 builds and testing. Pull request #1879 by
  MSP-Greg.
* Fix gem open to open highest version number rather than lowest. Pull
  request #1877 by Tim Pope.
* Add a test for requiring a default spec as installed by the ruby
  installer. Pull request #1899 by Samuel Giddins.
* Fix broken --exact parameter to gem command. Pull request #1873 by Jason
  Frey.
* [Installer] Generate backwards-compatible binstubs. Pull request #1904
  by Samuel Giddins.
* Fix pre-existing source recognition on add action. Pull request #1883 by
  Jonathan Claudius.
* Prevent negative IDs in output of #inspect. Pull request #1908 by Vít
  Ondruch.
* Allow Gem.finish_resolve to respect already-activated specs. Pull
  request #1910 by Samuel Giddins.

=== 2.6.11 / 2017-03-16

Bug fixes:

* Fixed broken tests on ruby-head. Pull request #1841 by
  SHIBATA Hiroshi.
* Update vendored Molinillo to 0.5.7. Pull request #1859 by Samuel
  Giddins.
* Avoid activating Ruby 2.5 default gems when possible. Pull request #1843
  by Samuel Giddins.
* Use improved resolver sorting algorithm. Pull request #1856 by
  Samuel Giddins.

=== 2.6.10 / 2017-01-23

Bug fixes:

* Fix `require` calling the wrong `gem` method when it is overridden.
  Pull request #1822 by Samuel Giddins.

=== 2.6.9 / 2017-01-20

Bug fixes:

* Allow initializing versions with empty strings. Pull request #1767 by
  Luis Sagastume.
* Fix TypeError on 2.4. Pull request #1788 by Nobuyoshi Nakada.
* Don't output mkmf.log message if compilation didn't fail. Pull request
  #1808 by Jeremy Evans.
* Fixed broken links and overzealous URL encoding in gem server. Pull
  request #1809 by Nicole Orchard.
* Update vendored Molinillo to 0.5.5. Pull request #1812 by Samuel
  Giddins.
* RakeBuilder: avoid frozen string issue. Pull request #1819 by Olle
  Jonsson.

=== 2.6.8 / 2016-10-29

Bug fixes:

* Improve SSL verification failure message. Pull request #1751
  by Eric Hodel.
* Ensure `to_spec` falls back on prerelease specs. Pull request
  #1755 by André Arko.
* Update vendored Molinillo to 0.5.3. Pull request #1763 by
  Samuel Giddins.

=== 2.6.7 / 2016-09-26

Bug fixes:

* Install native extensions in the correct location when using the
  `--user-install` flag. Pull request #1683 by Noah Kantrowitz.
* When calling `Gem.sources`, load sources from `configuration`
  if present, else use the default sources. Pull request #1699
  by Luis Sagastume.
* Fail gracefully when attempting to redirect without a Location.
  Pull request #1711 by Samuel Giddins.
* Update vendored Molinillo to 0.5.1. Pull request #1714 by
  Samuel Giddins.

=== 2.6.6 / 2016-06-22

Bug fixes:

* Sort installed versions to make sure we install the latest version when
  running `gem update --system`. As a one-time fix, run
  `gem update --system=2.6.6`. Pull request #1601 by David Radcliffe.

------------------------------------------------------------------------------

RubyGems installed the following executables:
	/source/rubinius/rubinius/bin/gem

RubyGems system software updated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inherited Class's Deep Singleton Class

3 participants