Skip to content

Instantly share code, notes, and snippets.

@drusepth
Created August 27, 2021 07:51
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 drusepth/886afeadc7eda2a08c9413e98249a541 to your computer and use it in GitHub Desktop.
Save drusepth/886afeadc7eda2a08c9413e98249a541 to your computer and use it in GitHub Desktop.
def function_snapshot_from_passing_tests(n)
return n if (0..1).include?(n)
(function_snapshot_from_passing_tests(n - 1) + function_snapshot_from_passing_tests(n - 2))
end
def regressed_function(n)
return n if (0...1).include?(n)
(regressed_function(n - 1) + regressed_function(n - 2))
end
def foo
puts binding.source_location.inspect
end
foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment