Actions
Bug #16140
closednon-typed variable
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux-gnu]
Backport:
Description
I not sure if it's a bug. But maybe it is.
a = 2
puts a
a = "two"
puts a
=> 2
=> two
I was expecting it to produce an error. After all, Ruby is supposed to be a dynamically typed language. Clearly for variables, it's not the case. if it's not a bug, it is possibly an option to be added to the interpreter.
Actions
Like0
Like0Like0