Ruby: Remove unused examples

This commit is contained in:
Harry Maclean
2023-05-27 12:01:00 +00:00
parent 562065f29e
commit e515981c81
2 changed files with 0 additions and 39 deletions

View File

@@ -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

View File

@@ -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