Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Do not use one-letter variables #131

Merged
merged 1 commit into from May 14, 2013

Conversation

3 participants
Contributor

sheerun commented Feb 27, 2013

No description provided.

Member

zzak commented Feb 27, 2013

If it's any consolation, we can skip changing the method and use a call-seq in the rdoc to give "o" any name we want:

  ###
  #  call-seq:
  #    Psych.to_json object
  #
  # Dump the given Ruby +object+ to a JSON string.
  def self.to_json o
    visitor = Psych::Visitors::JSONTree.new
    visitor << o
    visitor.tree.yaml
  end

@ghost ghost assigned zzak Feb 27, 2013

Contributor

sheerun commented Feb 27, 2013

This is just silly ;)

Member

zzak commented Feb 27, 2013

The problem is that "o" is used for "object" all over the place throughout Psych, so you'd have to change it everywhere if you wanted to be consistent.

Contributor

sheerun commented Feb 27, 2013

Good idea

tenderlove added a commit that referenced this pull request May 14, 2013

Merge pull request #131 from sheerun/fix/naming
Do not use one-letter variables

@tenderlove tenderlove merged commit aa4a9b4 into ruby:master May 14, 2013

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment