Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@perlun
Created March 17, 2017 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save perlun/6cba4f545897f9b079e8e83e3bfab302 to your computer and use it in GitHub Desktop.
Save perlun/6cba4f545897f9b079e8e83e3bfab302 to your computer and use it in GitHub Desktop.
# Attempt to work around an incorrect line number in a JRuby stack trace. Thus far, unsuccessful.
module PipelineSteps
class Auth
class << self
def some_method
app = nil
app[:auth_object] ||= begin
file_contents = 'puts "gurka"'
file_name = 'foo.rb'
create_auth_object(file_contents, file_name)
end
end
def create_auth_object(file_contents, file_name)
auth_class = Class.new
auth_class.class_eval(content, file_name)
auth_class.new
end
end
end
end
PipelineSteps::Auth.some_method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment