Skip to content

Commit 6b9dd5a

Browse files
author
Montana Flynn
committed
Minor refactor
1 parent d713720 commit 6b9dd5a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/targets/ruby/native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = function (source, options) {
1414
var method = source.method.toUpperCase()
1515
var methods = ['GET', 'POST', 'HEAD', 'DELETE', 'PATCH', 'PUT', 'OPTIONS', 'COPY', 'LOCK', 'UNLOCK', 'MOVE', 'TRACE']
1616
var capMethod = method.charAt(0) + method.substring(1).toLowerCase()
17-
if (methods.indexOf(this.source.method.toLowerCase()) === 0) {
17+
if (methods.indexOf(method) < 0) {
1818
code.push('class Net::HTTP::%s < Net::HTTPRequest')
1919
code.push(util.format('class Net::HTTP::%s < Net::HTTPRequest', capMethod))
2020
code.push(util.format(' METHOD = \'%s\'', method.toUpperCase()))

0 commit comments

Comments
 (0)