Skip to content

Commit 3740131

Browse files
committed
Use \A and \z to match beginning and end of string
1 parent 9524403 commit 3740131

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/ruby_odata/service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def execute
101101
rescue Exception => e
102102
handle_exception(e)
103103
end
104-
return Integer(@response.body) if @response.body =~ /^\d+$/
104+
return Integer(@response.body) if @response.body =~ /\A\d+\z/
105105
handle_collection_result(@response.body)
106106
end
107107

0 commit comments

Comments
 (0)