rubyrubygemsgemspecs

Can comments be used in the .gemspec file?


I'm making a Ruby gem, and I want to put comments in the file. Would this be allowed, or would it mess up the gem? My code:

# test

Gem::Specification.new do |s|
  s.name        = 'My Gem' # Add a better name
  s.version     = '0.0.0'
  s.summary     = "Summary of my gem"
  s.description = "More detailed description" # Maybe a tiny bit more detailed?
  s.authors     = ["Me"]
  s.email       = 'foo.bar@example.net' # Please don't email me, as I rarely look at my email
  s.files       = ["lib/myGem.ruby"] # Change to .rb
  s.homepage    =
    'https://rubygems.org/gems/foobar'
end

# Add s.license

=begin
foo
bar
=end

Thanks in advance.


Solution

  • I'm making a Ruby gem, and I want to put comments in the file. Would this be allowed, or would it mess up the gem?

    Like most programming languages, Ruby has comments. In fact, Ruby has two kinds of comments:

    If you want to know all the gory details, I recommend reading: