# Project Euler Problem 2, solution internals related using ruby debugger

```\$ruby -rdebug euler-two.rb
Debug.rb
Emacs support available.

/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:57:        RUBYGEMS_ACTIVATION_MONITOR.enter
(rdb:1) r
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:57:        RUBYGEMS_ACTIVATION_MONITOR.enter
(rdb:1)
r
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:57:        RUBYGEMS_ACTIVATION_MONITOR.enter
(rdb:1) next
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:143:    RUBYGEMS_ACTIVATION_MONITOR.exit
(rdb:1) next
euler-two.rb:3:n1, n2 = 1, 2
(rdb:1) next
euler-two.rb:4:sum = 0
(rdb:1) print n1
1nil
(rdb:1) print n2
2nil
(rdb:1) next
euler-two.rb:6:while n2 < 4000000
(rdb:1) print n2
2nil
(rdb:1) next
euler-two.rb:7:sum += (n2 % 2 == 0) ? n2 : 0
(rdb:1) next
euler-two.rb:7:sum += (n2 % 2 == 0) ? n2 : 0
(rdb:1) print sum
0nil
(rdb:1) next
euler-two.rb:8:n1, n2 = n2, (n1 + n2) # iterate through fibonacci seq
(rdb:1) print sum
2nil
(rdb:1) next
euler-two.rb:8:n1, n2 = n2, (n1 + n2) # iterate through fibonacci seq
(rdb:1) next
euler-two.rb:7:sum += (n2 % 2 == 0) ? n2 : 0
(rdb:1) next
euler-two.rb:7:sum += (n2 % 2 == 0) ? n2 : 0
(rdb:1) print sum
2nil
(rdb:1) next
euler-two.rb:8:n1, n2 = n2, (n1 + n2) # iterate through fibonacci seq
(rdb:1) print sum
2nil
(rdb:1) continue
/usr/lib/ruby/2.1.0/debug.rb:290:in `eval':undefined local variable or method `continue' for main:Object
from /usr/lib/ruby/2.1.0/debug.rb:290:in `rescue in debug_eval'
from /usr/lib/ruby/2.1.0/debug.rb:287:in `debug_eval'
from /usr/lib/ruby/2.1.0/debug.rb:661:in `block in debug_command'
from /usr/lib/ruby/2.1.0/debug.rb:400:in `catch'
from /usr/lib/ruby/2.1.0/debug.rb:400:in `debug_command'
from /usr/lib/ruby/2.1.0/debug.rb:859:in `trace_func'
from /usr/lib/ruby/2.1.0/debug.rb:1085:in `block in '
from euler-two.rb:8:in `'
(rdb:1) puts

nil
(rdb:1) puts sum
2
nil
(rdb:1) puts n1
2
nil
(rdb:1) puts n2
3
nil
(rdb:1) quit
Really quit? (y/n) y
\$

```