25 May 2013

The Ruby Reflector

Topic

NoMethodError

  Source Favicon
By Bryan McLellan of Opscode Blog 4 months ago.
Email

[ CHEF-3809 ] - Getting error NoMethodError: undefined method ` CloseHandle' for Chef:: ReservedNames:: Win32::Handle:Class on Windows servers

[ CHEF-3836 ] - Run Lock tests randomly fail on slower Ci machines

Improvement

[ CHEF-3156 ] - Net:: SSH dependency prevents using HMAC SHA2 family

Release Notes - 10.20.0

Bug

[ CHEF-2960 ] - Upgrade JSON dependency to 1.7+

[ CHEF-3367 ] …

opscode.com Read
  Source Favicon
By Bryan McLellan of Opscode Blog 7 months ago.
Email

…statement: block in configure\_session': undefined method []' for nil: NilClass ( NoMethodError)

[ CHEF-3489 ] - chef-client should permit whitespace in -override-runlist

[ CHEF-3508 ] - Improper usage of Fileutils#rm_f in Chef::Provider:: Ifconfig

Improvement

[ CHEF-2826 ] - pacman (arch package provider) doesn't allow for custom package repos

[ CHEF-3455 ] - Add commandline options to allow …

opscode.com Read
  Source Favicon
By santiago.pastorino of WyeWorks Blog - The Team's Voice 10 months ago.
Email

…puts [].blank? puts [1].blank? end

This will raise an undefined method `blank?' for ( NoMethodError).

Refinements has been committed to ruby by Shugo Maeda, but it may be reverted for Ruby 2.0. The Ruby Core is asking for feedback, so, what are the use cases you see Refinements is good for you?

You can learn more about Refinements reading Refinements in practice, a blog post from Yehuda Katz

blog.wyeworks.com Read
  Source Favicon
By David of David Chelimsky 11 months ago.
Email

Fix regression of edge case behavior. double.should_receive(:foo) { a } was causing a NoMethodError when double.stub(:foo).and_return(a, b) had been setup before ( Myron Marston).

Infinite loop generated by using any_instance and dup . ( Sidu Ponnappa @ kaiwren)

double.should_receive(:foo).at_least(:once).and_return(a) always returns a even if :foo is already stubbed.

Prevent infinite loop when interpolating a null double into a string as an integer ( "%i" % double.as null object…

blog.davidchelimsky.net Read
  Source Favicon
By Sarah of the evolving ultrasaurus over 1 year ago.
Email

undefined method `xml_subset_of?' for # ( NoMethodError)

As it turns out, in my zeal to make sure everything was using the latest and great new stuff, I had forgotten to move over this critical configuration line in cucumbers env.rb:

World(CustomMatchers)

Now, my cucumber feature is happily failing cuz my code doesn't work. Whew. I couldn't find this documented anywhere and I'm not even sure where this documentation would belong. I found a hint on the cucumber …

ultrasaurus.com Read
  Source Favicon
Email

…) handled the case where using the :id_partition pattern in a URL or path pattern raises a NoMethodError on an unsaved resource ( ac82244 ). He and I are now enemies for life for his use of nil .

Prem fixed another bug: if you have a path or URL pattern with :class in it it will show a warning. He removed this warning ( b4ff2c5 ).

Prem worked with Steve Richert ( laserlemon ) to show the Gemnasium results in the README ( 3e20907 and …

robots.thoughtbot.com Read
  Source Favicon
By David of David Chelimsky over 1 year ago.
Email

allow to_ary to be called without raising NoMethodError ( Mikhail Dieterle)

any_instance properly restores private methods ( Sidu Ponnappa)

rspec-rails-2.7.0

full changelog

Enhancments

ActiveRecord::Relation can use the =~ matcher ( Andy Lindeman)

Make generated controller spec more consistent with regard to ids ( Brent J. Nordquist)

Less restrictive autotest mapping between spec and implementation files ( José Valim)

require 'rspec/autorun' …

blog.davidchelimsky.net Read
  Source Favicon
By Taryn of Ruby-coloured glasses over 1 year ago.
Email

Ack! I just tried to upgrade rubygems... and it destroyed my working version of rails 2.3.5 (yes, we use it for a client that has not yet upgraded due to the quite reasonable "it ain't broke" assumption).

Now I can't run script/server without one of the following errors: /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:268:in `==': undefined method `name' for " Ascii85": String ( NoMethodError) or /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:in …

rubyglasses.blogspot.com Read
  Source Favicon
Email

Every developer runs into the dreaded nil object error: NoMethodError in Ruby, AttributeError in Python, and NullPointerException in Java. These errors are one of the largest sources of bugs . Even most static languages allow nil objects to silently pass as any type of object, and it's just as easy in Ruby to let a nil object slip into seemingly well-factored code. If this is such a widespread and well-understood problem, why aren't there best practices and solutions …

robots.thoughtbot.com Read
  Source Favicon
By Aaron Patterson of Tender Lovemaking almost 2 years ago.
Email

Naturally, if we were to call to_ary directly on this object it would raise a NoMethodError exception. When calling flatten, ruby will swallow the exception. If we enable $DEBUG by running ruby with -d , we can see the exception: [aaron@higgins ~]$ ruby -d test.rb Exception `LoadError' at /Users/aaron/.local/lib/ruby/site_ruby/1.9.1/rubygems.rb:1215 - cannot load such file -- rubygems/defaults/operating_system Exception `LoadError' at /Users/aaron/.local/lib/ruby/site_ruby/1.9.1/rubygems.rb:1224 …

tenderlovemaking.com Read