In the default skeleton code for a Ruby gem, the .gemspec
file inside of the Gem::Specification
class there is this line:
spec.files = `git ls-files -z`.split("\x0")
<- please note the PS at the end of this question
When I run git ls-files -z
in the terminal I get
.gitignoreGemfileLICENSE.txtREADME.mdRakefiledogeify.gemspeclib/dogeify.rblib/dogeify/version.rb
What exactly is the .split("\x0")
method producing as the output?
PS: In reference to the first line of code, does the `` characters allow the terminal to execute code and combine the result with a Ruby method?