From ccad8ec9bf3058e21e513f239b6a519ec66eab3a Mon Sep 17 00:00:00 2001 From: Serge Muzyka Date: Fri, 6 Dec 2024 13:13:32 -0500 Subject: [PATCH 1/2] Fixed error 'undefined method =~ for true:TrueClass' that occures when nil matches regexp (Ruby 3.2.6). --- .idea/.gitignore | 8 ++ .idea/misc.xml | 4 + .idea/modules.xml | 8 ++ .idea/refile.iml | 201 +++++++++++++++++++++++++++++ .idea/vcs.xml | 6 + lib/pmacs_refile/attacher.rb | 2 +- lib/pmacs_refile/backend_macros.rb | 2 +- 7 files changed, 229 insertions(+), 2 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/refile.iml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..13566b81 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..b1b1dbeb --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..3cdb4621 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/refile.iml b/.idea/refile.iml new file mode 100644 index 00000000..77dc678f --- /dev/null +++ b/.idea/refile.iml @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + file://$MODULE_DIR$/app + + + file://$MODULE_DIR$/app/assets + + + file://$MODULE_DIR$/app/channels + + + file://$MODULE_DIR$/app/controllers + + + file://$MODULE_DIR$/app/helpers + + + file://$MODULE_DIR$/app/mailers + + + file://$MODULE_DIR$/app/models + + + file://$MODULE_DIR$/app/views + + + file://$MODULE_DIR$/config + + + file://$MODULE_DIR$/config/cable.yml + + + file://$MODULE_DIR$/config/database.yml + + + file://$MODULE_DIR$/config/environment.rb + + + file://$MODULE_DIR$/config/environments + + + file://$MODULE_DIR$/config/initializers + + + file://$MODULE_DIR$/config/locales + + + file://$MODULE_DIR$/config/routes + + + file://$MODULE_DIR$/config/routes.rb + + + file://$MODULE_DIR$/config + + + file://$MODULE_DIR$/db + + + file://$MODULE_DIR$/db/migrate + + + file://$MODULE_DIR$/db/seeds.rb + + + file://$MODULE_DIR$/lib + + + file://$MODULE_DIR$/lib/assets + + + file://$MODULE_DIR$/lib/tasks + + + file://$MODULE_DIR$/lib/templates + + + file://$MODULE_DIR$/log/development.log + + + file://$MODULE_DIR$/public + + + file://$MODULE_DIR$/public/javascripts + + + file://$MODULE_DIR$/public/stylesheets + + + file://$MODULE_DIR$/tmp + + + file://$MODULE_DIR$/vendor + + + file://$MODULE_DIR$/vendor/assets + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/lib/pmacs_refile/attacher.rb b/lib/pmacs_refile/attacher.rb index 819cad50..cb21838f 100644 --- a/lib/pmacs_refile/attacher.rb +++ b/lib/pmacs_refile/attacher.rb @@ -145,7 +145,7 @@ def delete! end def remove? - remove and remove != "" and remove !~ /\A0|false$\z/ + remove and remove != "" and remove.to_s !~ /\A0|false$\z/ end def present? diff --git a/lib/pmacs_refile/backend_macros.rb b/lib/pmacs_refile/backend_macros.rb index 3e14f451..3cbce85c 100644 --- a/lib/pmacs_refile/backend_macros.rb +++ b/lib/pmacs_refile/backend_macros.rb @@ -35,7 +35,7 @@ def verify_uploadable(method) end def valid_id?(id) - id =~ /\A[a-z0-9]+\z/i + id.to_s =~ /\A[a-z0-9]+\z/i end def decode_id(id) From 6020bc8dbedf33d8040d8fe3e51f28993082a27e Mon Sep 17 00:00:00 2001 From: Serge Muzyka Date: Fri, 6 Dec 2024 13:24:44 -0500 Subject: [PATCH 2/2] Deleted .idea folder which was added unintentionally. --- .idea/.gitignore | 8 -- .idea/misc.xml | 4 - .idea/modules.xml | 8 -- .idea/refile.iml | 201 ---------------------------------------------- .idea/vcs.xml | 6 -- 5 files changed, 227 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/refile.iml delete mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b81..00000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index b1b1dbeb..00000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 3cdb4621..00000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/refile.iml b/.idea/refile.iml deleted file mode 100644 index 77dc678f..00000000 --- a/.idea/refile.iml +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - file://$MODULE_DIR$/app - - - file://$MODULE_DIR$/app/assets - - - file://$MODULE_DIR$/app/channels - - - file://$MODULE_DIR$/app/controllers - - - file://$MODULE_DIR$/app/helpers - - - file://$MODULE_DIR$/app/mailers - - - file://$MODULE_DIR$/app/models - - - file://$MODULE_DIR$/app/views - - - file://$MODULE_DIR$/config - - - file://$MODULE_DIR$/config/cable.yml - - - file://$MODULE_DIR$/config/database.yml - - - file://$MODULE_DIR$/config/environment.rb - - - file://$MODULE_DIR$/config/environments - - - file://$MODULE_DIR$/config/initializers - - - file://$MODULE_DIR$/config/locales - - - file://$MODULE_DIR$/config/routes - - - file://$MODULE_DIR$/config/routes.rb - - - file://$MODULE_DIR$/config - - - file://$MODULE_DIR$/db - - - file://$MODULE_DIR$/db/migrate - - - file://$MODULE_DIR$/db/seeds.rb - - - file://$MODULE_DIR$/lib - - - file://$MODULE_DIR$/lib/assets - - - file://$MODULE_DIR$/lib/tasks - - - file://$MODULE_DIR$/lib/templates - - - file://$MODULE_DIR$/log/development.log - - - file://$MODULE_DIR$/public - - - file://$MODULE_DIR$/public/javascripts - - - file://$MODULE_DIR$/public/stylesheets - - - file://$MODULE_DIR$/tmp - - - file://$MODULE_DIR$/vendor - - - file://$MODULE_DIR$/vendor/assets - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddf..00000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file