Skip to content

Commit

Permalink
display real Ruby error also for 'NoMethodError'
Browse files Browse the repository at this point in the history
  • Loading branch information
ultrasaurus committed Sep 11, 2011
1 parent f5d784b commit 10e030f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/pie.rb
Expand Up @@ -60,7 +60,7 @@ def place(options)

def method_missing name
place = places[name.to_sym]
raise NoMethodError, "Pie was expecting a place named '#{name}', but we've only got places named: #{places.keys.join(', ')}" if place.nil?
raise NoMethodError, "NoMethodError: Pie was expecting a place named '#{name}', but we've only got places named: #{places.keys.join(', ')}" if place.nil?
place
end

Expand Down
2 changes: 1 addition & 1 deletion pie.gemspec
Expand Up @@ -3,7 +3,7 @@ spec = Gem::Specification.new do |s|
s.name = 'pie'
s.authors = 'Sarah Allen, Sarah Mei, Rich Kilmer'
s.homepage = 'http://github.com/blazingcloud/pie'
s.version = '0.2.12'
s.version = '0.2.13'
s.summary = 'Pie, a language for developing games and books'
s.files = Dir['lib/*.rb']+Dir['views/*.erb']+['README.md', 'MIT-LICENSE.txt', 'bin/pie']
s.bindir = 'bin'
Expand Down
2 changes: 1 addition & 1 deletion spec/pie_spec.rb
Expand Up @@ -104,7 +104,7 @@ def get_binding
place boat:"this is a boat"
something.path boat:north
end
}.should raise_error(SyntaxError, "#<NoMethodError: Pie was expecting a place named 'something', but we've only got places named: boat")
}.should raise_error(NoMethodError, "NoMethodError: Pie was expecting a place named 'something', but we've only got places named: boat")

end

Expand Down

0 comments on commit 10e030f

Please sign in to comment.