Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit c4907bb5d0ab9a949010eec5ba529b7cb1a5f349 1 parent 57c67f3
@myronmarston authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/vcr/cucumber_tags.rb
View
2  lib/vcr/cucumber_tags.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.