Code Monkey home page Code Monkey logo

Comments (1)

mbj avatar mbj commented on August 26, 2024

Yeah, you are correct. "Least powerful rule" ;)

Will change it.

On Sat, Feb 16, 2013 at 11:18:14PM -0800, Dan Kubb wrote:

This is an edge case, but the following code has identical behaviour, provided the same-named method isn't declared in that scope:

Kernel.system(...)
system(...)

@mbj I know you've said you prefer the first one for understandability. I think if the code works the same with less information, then the other should be preferred.

The same rule can be applied to self.class, eg:

class MyClass < ParentClass
  def call(*args)
    self.class.call(*args)
  end

  def one
    self.class.call(1)
  end
end

In this example the self.class could be removed in #one and the code would continue to work.


Reply to this email directly or view it on GitHub:
#30

Markus Schirp

Phone: +49 201 / 360 379 14
Fax: +49 201 / 360 379 16
Web: www.seonic.net
Email: [email protected]
Twitter: twitter.com/m_b_j
OS-Code: github.com/mbj

Seonic IT-Systems GbR
Anton Shatalov & Markus Schirp
Altendorferstrasse 44
D-45127 Essen

from mutant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.