Skip to content
Permalink
Browse files

In the list of method names, call to_s, because the methods can come …

…back as symbols (which cannot be subbed)
  • Loading branch information...
kenmazaika committed Jun 26, 2012
1 parent a46cc73 commit bf89044927a1ada1557e3f74d2d7b8ce628c2bcf
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/tourist.rb
@@ -76,7 +76,7 @@ def self.make_tourist(tourist_name,host="http://localhost:3000",tours=[],number=
# Returns list of tours this tourist knows about. (Meant to be run on a subclass
# instance; returns the list of tours available).
def tours
methods.grep(/^tour_/).map {|m| m.sub(/^tour_/,'')}
methods.map(&:to_s).grep(/^tour_/).map {|m| m.sub(/^tour_/,'')}
end

def run_tour(tour_name)

0 comments on commit bf89044

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.