Permalink
Browse files

String#start_with? is a handy method, but it's not available in Ruby …

…1.8.6. Use a regex instead so it works on ruby 1.8.6, 1.8.7 and 1.9.1.
  • Loading branch information...
1 parent 57c67f3 commit c4907bb5d0ab9a949010eec5ba529b7cb1a5f349 @myronmarston committed Feb 25, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/vcr/cucumber_tags.rb
View
@@ -18,7 +18,7 @@ def initialize(main_object)
def tags(*tag_names)
options = tag_names.last.is_a?(::Hash) ? tag_names.pop : {}
tag_names.each do |tag_name|
- tag_name = "@#{tag_name}" unless tag_name.start_with?('@')
+ tag_name = "@#{tag_name}" unless tag_name =~ /^@/
sandbox_name = "cucumber_tags/#{tag_name.gsub(/\A@/, '')}"
@main_object.instance_eval do

0 comments on commit c4907bb

Please sign in to comment.