Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix minor thread-safety issue on non-GVL ruby in Database#schema

  • Loading branch information...
commit 8e991900c97a3e2d9eb4ef1f3d61441c669f4da5 1 parent 2583cf7
@jeremyevans authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/sequel/database/query.rb
4 lib/sequel/database/query.rb
@@ -195,7 +195,9 @@ def schema(table, opts={})
opts[:schema] = sch if sch && !opts.include?(:schema)
Sequel.synchronize{@schemas.delete(quoted_name)} if opts[:reload]
- return Sequel.synchronize{@schemas[quoted_name]} if @schemas[quoted_name]
+ if v = Sequel.synchronize{@schemas[quoted_name]}
+ return v
+ end
cols = schema_parse_table(table_name, opts)
raise(Error, 'schema parsing returned no columns, table probably doesn\'t exist') if cols.nil? || cols.empty?
Please sign in to comment.
Something went wrong with that request. Please try again.