From: "zw963 (Wei Zheng)" Date: 2021-08-21T08:07:21+00:00 Subject: [ruby-core:105041] [Ruby master Misc#18125] A strange behavior when same name variable/method coexist issue. Issue #18125 has been reported by zw963 (Wei Zheng). ---------------------------------------- Misc #18125: A strange behavior when same name variable/method coexist issue. https://bugs.ruby-lang.org/issues/18125 * Author: zw963 (Wei Zheng) * Status: Open * Priority: Normal ---------------------------------------- Following is a example. ## Reproduce ```rb def deploy_to "deploy_to" end deploy_to = "#{deploy_to} new place" p defined? deploy_to # => local_varible p deploy_to # => " new place" ``` ## What we expected. ```rb def deploy_to "deploy_to" end deploy_to = "#{deploy_to} new place" p defined? deploy_to # => local_varible p deploy_to # => "deploy_to new place" ``` This strange behavior i found it after several years ruby programming. Perhaps this is always the expected behavior? i report here for check anyway -- https://bugs.ruby-lang.org/ Unsubscribe: