# File lib/rubygems/dependency.rb, line 119defrequirementreturn@requirementifdefined?(@requirement) and@requirement# @version_requirements and @version_requirement are legacy ivar# names, and supported here because older gems need to keep# working and Dependency doesn't implement marshal_dump and# marshal_load. In a happier world, this would be an# attr_accessor. The horrifying instance_variable_get you see# below is also the legacy of some old restructurings.## Note also that because of backwards compatibility (loading new# gems in an old RubyGems installation), we can't add explicit# marshaling to this class until we want to make a big# break. Maybe 2.0.## Children, define explicit marshal and unmarshal behavior for# public classes. Marshal formats are part of your public API.# REFACTOR: See aboveifdefined?(@version_requirement) &&@version_requirementversion = @version_requirement.instance_variable_get:@version@version_requirement = nil@version_requirements = Gem::Requirement.newversionend@requirement = @version_requirementsifdefined?(@version_requirements)
end