Unterminated regexp meets end of file

(ruby):7: unterminated regexp meets end of file
THIS MESSAGE APPEARS IN #test_3 = should be false
test_3 = !(true) // true

i typed !(2>1)// (3>2)
not working . Please help me

The lesson text contains this example…

( 1 == 1 ) && ( 2 == 2 )  // true
( 1 == 2 ) || ( 2 == 2 ) // true
!( false ) // true

Only problem is those are JavaScript comments, not Ruby. It should have been written,

( 1 == 1 ) && ( 2 == 2 )  # true
( 1 == 2 ) || ( 2 == 2 ) # true
!( false ) # true

Ruby sees // and expects a regular expression, which is what causes the error.

Why are you using //? Or in ruby is ||

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.