Skip to content

Commit

Permalink
Remove unneeded shell exec to get Ruby version info
Browse files Browse the repository at this point in the history
In issue getsentry#943 sub-point getsentry#2, it was identified that using RUBY_DESCRIPTION
returns the same thing as `ruby -v` does for all currently supported Ruby
versions. This change fixes that sub-point and provides a fallback to the
old method in the event as a safety precaution.
  • Loading branch information
Jeremy Johnstone committed Jan 13, 2020
1 parent 065cf97 commit ce5fb12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/raven/context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def os_context
def runtime_context
@runtime_context ||= {
:name => RbConfig::CONFIG["ruby_install_name"],
:version => Raven.sys_command("ruby -v")
:version => RUBY_DESCRIPTION || Raven.sys_command("ruby -v")
}
end
end
Expand Down

0 comments on commit ce5fb12

Please sign in to comment.