@dfa = Time.new
@type_me = gets
@i = 0
def type
pause_duration = 2
start_time = Time.new
until Time.new == start_time + pause_duration
puts "#{start_time + pause_duration} || #{Time.new}"
end
print @type_me[@i]
@i += 1
type
end
type
왜 Time.new는 start_time + pause_duration과 동등하지 않습니까?Time 객체가 Ruby에서 동일한 것으로 평가되지 않는 이유는 무엇입니까?
> =로 처리하는 방법을 알려 주셔서 감사합니다. – cyclingLinguist
반갑습니다. 또한 원하는 모든 것이 2 초 동안 잠을 자면'sleep 2'을 사용하십시오. – pguardiario