Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::Specification#add_development_dependency
add_development_dependency(gem, *requirements)
lib/rubygems/specification.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/specification.rb, line 559
def add_development_dependency(gem, *requirements)
add_dependency_with_type(gem, :development, requirements)
end
Adds a development dependency named gem with requirements to this gem.
Usage:
Example
spec.add_development_dependency 'example', '>= 1.1.4', '< 2'
Development dependencies aren’t installed by default and aren’t activated when a gem is required.
See also
#add_dependency_with_type
#add_runtime_dependency
#add_dependency
#add_self_to_load_path
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0