When I am trying to initialize this it is working perfectly fine
class Abc def initialize(parent_id, user = nil, permission) end end Abc.new(1 ,2, "some_permission") But when I am doing this
class Abc def initialize(parent_id, user = nil, permission, g_data = nil) end end Abc.new(1 ,2, "some_permission", 4)
I am getting syntax error syntax error, unexpected '=', expecting ')' This is a strange behavior why it is not taking two arguments default as nil