mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Ruby: Remove unused examples
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
require 'plist'
|
||||
class UsersController < ActionController::Base
|
||||
def example
|
||||
# not safe
|
||||
config = true
|
||||
result = Plist.parse_xml(params[:yaml_string])
|
||||
result = Plist.parse_xml(params[:yaml_string], marshal: config)
|
||||
result = Plist.parse_xml(params[:yaml_string], marshal: true)
|
||||
|
||||
# safe
|
||||
config = false
|
||||
result = Plist.parse_xml(params[:yaml_string], marshal: false)
|
||||
result = Plist.parse_xml(params[:yaml_string], marshal: config)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
require 'yaml'
|
||||
class UsersController < ActionController::Base
|
||||
def example
|
||||
# safe
|
||||
Psych.load(params[:yaml_string])
|
||||
Psych.load_file(params[:yaml_file])
|
||||
Psych.parse_stream(params[:yaml_string])
|
||||
Psych.parse(params[:yaml_string])
|
||||
Psych.parse_file(params[:yaml_file])
|
||||
# unsafe
|
||||
Psych.unsafe_load(params[:yaml_string])
|
||||
Psych.unsafe_load_file(params[:yaml_file])
|
||||
Psych.load_stream(params[:yaml_string])
|
||||
parse_output = Psych.parse_stream(params[:yaml_string])
|
||||
parse_output.to_ruby
|
||||
Psych.parse(params[:yaml_string]).to_ruby
|
||||
Psych.parse_file(params[:yaml_file]).to_ruby
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user