File tree Expand file tree Collapse file tree 5 files changed +25
-25
lines changed Expand file tree Collapse file tree 5 files changed +25
-25
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ require 'rubygems'
10
10
11
11
version = ">= 0.a"
12
12
13
- if ARGV . first
14
- str = ARGV . first
15
- str = str . dup . force_encoding ( "BINARY" ) if str . respond_to? :force_encoding
16
- if str =~ / \A _(.*)_ \z / and Gem ::Version . correct? ( $1 ) then
17
- version = $1
13
+ str = ARGV . first
14
+ if str
15
+ str = str . b [ / \A _(.*)_ \z / , 1 ]
16
+ if str and Gem ::Version . correct? ( str )
17
+ version = str
18
18
ARGV . shift
19
19
end
20
20
end
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ require 'rubygems'
10
10
11
11
version = ">= 0.a"
12
12
13
- if ARGV . first
14
- str = ARGV . first
15
- str = str . dup . force_encoding ( "BINARY" ) if str . respond_to? :force_encoding
16
- if str =~ / \A _(.*)_ \z / and Gem ::Version . correct? ( $1 ) then
17
- version = $1
13
+ str = ARGV . first
14
+ if str
15
+ str = str . b [ / \A _(.*)_ \z / , 1 ]
16
+ if str and Gem ::Version . correct? ( str )
17
+ version = str
18
18
ARGV . shift
19
19
end
20
20
end
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ require 'rubygems'
10
10
11
11
version = ">= 0.a"
12
12
13
- if ARGV . first
14
- str = ARGV . first
15
- str = str . dup . force_encoding ( "BINARY" ) if str . respond_to? :force_encoding
16
- if str =~ / \A _(.*)_ \z / and Gem ::Version . correct? ( $1 ) then
17
- version = $1
13
+ str = ARGV . first
14
+ if str
15
+ str = str . b [ / \A _(.*)_ \z / , 1 ]
16
+ if str and Gem ::Version . correct? ( str )
17
+ version = str
18
18
ARGV . shift
19
19
end
20
20
end
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ require 'rubygems'
10
10
11
11
version = ">= 0.a"
12
12
13
- if ARGV . first
14
- str = ARGV . first
15
- str = str . dup . force_encoding ( "BINARY" ) if str . respond_to? :force_encoding
16
- if str =~ / \A _(.*)_ \z / and Gem ::Version . correct? ( $1 ) then
17
- version = $1
13
+ str = ARGV . first
14
+ if str
15
+ str = str . b [ / \A _(.*)_ \z / , 1 ]
16
+ if str and Gem ::Version . correct? ( str )
17
+ version = str
18
18
ARGV . shift
19
19
end
20
20
end
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ require 'rubygems'
10
10
11
11
version = ">= 0.a"
12
12
13
- if ARGV . first
14
- str = ARGV . first
15
- str = str . dup . force_encoding ( "BINARY" ) if str . respond_to? :force_encoding
16
- if str =~ / \A _(.*)_ \z / and Gem ::Version . correct? ( $1 ) then
17
- version = $1
13
+ str = ARGV . first
14
+ if str
15
+ str = str . b [ / \A _(.*)_ \z / , 1 ]
16
+ if str and Gem ::Version . correct? ( str )
17
+ version = str
18
18
ARGV . shift
19
19
end
20
20
end
You can’t perform that action at this time.
0 commit comments