Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Myron Marston authored February 24, 2010

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/vcr/cucumber_tags.rb
2  lib/vcr/cucumber_tags.rb
@@ -18,7 +18,7 @@ def initialize(main_object)
18 18
     def tags(*tag_names)
19 19
       options = tag_names.last.is_a?(::Hash) ? tag_names.pop : {}
20 20
       tag_names.each do |tag_name|
21  
-        tag_name = "@#{tag_name}" unless tag_name.start_with?('@')
  21
+        tag_name = "@#{tag_name}" unless tag_name =~ /^@/
22 22
         sandbox_name = "cucumber_tags/#{tag_name.gsub(/\A@/, '')}"
23 23
 
24 24
         @main_object.instance_eval do

0 notes on commit c4907bb

Please sign in to comment.
Something went wrong with that request. Please try again.