CodeGrade / bottlenose

CS assignment / grade mangement system
GNU Affero General Public License v3.0
38 stars 21 forks source link

NoMethodError on creating registration requests #106

Closed kylesferrazza closed 5 years ago

kylesferrazza commented 5 years ago

I get a NoMethodError when submitting a registration request.

NoMethodError - undefined method `match?' for "1":String
Did you mean?  match:
  app/models/reg_request.rb:35:in `block in confirm_sections'
  app/models/reg_request.rb:32:in `confirm_sections'
  app/controllers/reg_requests_controller.rb:18:in `create'

https://github.com/CodeGrade/bottlenose/blob/ffbae6eec4e507fb50a5de74e10e0d7e04f9f211/app/models/reg_request.rb#L35-L36

Should both instances of match? be match?

blerner commented 5 years ago

I don't understand why you're getting that -- what version of ruby are you running, and why does it appear to work for me?

kylesferrazza commented 5 years ago

Looks like it was introduced in 2.4

https://ruby-doc.org/core-2.4.0/Regexp.html#method-i-match-3F

Sorry - I was running 2.3.7 and will update.