Skip to content

Commit f98ff65

Browse files
committed
use eval() instead of send() in test
1 parent d917654 commit f98ff65

File tree

1 file changed

+1
-1
lines changed
  • ruby/ql/test/query-tests/security/cwe-094/UnsafeCodeConstruction/impl

1 file changed

+1
-1
lines changed

ruby/ql/test/query-tests/security/cwe-094/UnsafeCodeConstruction/impl/unsafeCode.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def send_stuff(x)
2222
end
2323

2424
def named_code(code)
25-
foo.send("def \n #{code} \n end") # OK - parameter is named code
25+
eval("def \n #{code} \n end") # OK - parameter is named code
2626
end
2727

2828
def joinStuff(my_arr)

0 commit comments

Comments
 (0)