Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 119 lines (115 sloc) 5.012 kb
20f5f99 added
Allen Otis authored
1 module W
2 def what(where=95)
3 yield where
4 end
5 end
6
7 class C1
8 include W
9 end
10
11 class C2 < C1
12 def what(where=98)
13 super where
14 end
15 end
16
17 o = C2.new
18 $v454 = 0
19 o.what { | arg | $v454 = arg }
20 unless $v454 == 98 ; raise 'error'; end
21 true
309fb48 Extracted the Trac description from each trac bug and inserted as a comm...
Peter McLain authored
22 #################### Trac Info
23 # ID: 454
24 # Summary: Block passing to super problem
25 # Changetime: 2009-04-22 15:48:37+00:00
26 ###
27
28 # The following shows where a block is not being propagated properly. The attached test case recreates it.
29 #
30 # ERROR 2023, Error, 'no block was passed'
31 # topaz 1> frame 14
32 # 14 SchemaStatements >> create_table::& (envId 1) @16 line 5
33 # receiver [112172801 MysqlAdapter] aMysqlAdapter
34 # table_name [112167937 sz:17 String] schema_migrations
35 # options [112167425 sz:6 RubyHash] aRubyHash
36 # _block nil
37 # create_sql nil
38 # table_definition [112166401 TableDefinition] aTableDefinition
39 # topaz 1> list
40 # def create_table(table_name, options = {})
41 # table_definition = TableDefinition.new(self)
42 # table_definition.primary_key(options[:primary_key] || Base.get_primary_key(table_name)) unless options[:id] == false
43 #
44 # yield table_definition
45 # * ^16 *******
46 #
47 # if options[:force] && table_exists?(table_name)
48 # drop_table(table_name, options)
49 # end
50 #
51 # create_sql = "CREATE#{' TEMPORARY' if options[:temporary]} TABLE "
52 # create_sql << "#{quote_table_name(table_name)} ("
53 # create_sql << table_definition.to_sql
54 # create_sql << ") #{options[:options]}"
55 # execute create_sql
56 #
57 # # method starts at line 100 of file /Users/lattam/Projects/MagLev/working/maglev_test-save/vendor/rails-save/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
58 # topaz 1> frame 15
59 # 15 SchemaStatements >> create_table:: (envId 1) @2 line 1
60 # receiver [112172801 MysqlAdapter] aMysqlAdapter
61 # t1 [112167937 sz:17 String] schema_migrations
62 # t2 [112167425 sz:6 RubyHash] aRubyHash
63 # topaz 1> list
64 # <a Ruby bridge method>
65 # * ^2 *******
66 #
67 # topaz 1> frame 16
68 # 16 MysqlAdapter >> create_table:: (envId 1) @8 line 2
69 # receiver [112172801 MysqlAdapter] aMysqlAdapter
70 # table_name [112167937 sz:17 String] schema_migrations
71 # options [112136193 sz:6 RubyHash] aRubyHash
72 # topaz 1> list
73 # def create_table(table_name, options = {}) #:nodoc:
74 # super(table_name, options.reverse_merge(:options => "ENGINE=InnoDB"))
75 # * ^8
76 #
77 # # method starts at line 472 of file /Users/lattam/Projects/MagLev/working/maglev_test-save/vendor/rails-save/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
78 # topaz 1> frame 17
79 # 17 MysqlAdapter >> create_table::& (envId 1) @2 line 1
80 # receiver [112172801 MysqlAdapter] aMysqlAdapter
81 # t1 [112167937 sz:17 String] schema_migrations
82 # t2 [112136193 sz:6 RubyHash] aRubyHash
83 # block [112110849 sz:0 ExecBlock] anExecBlock
84 # topaz 1> list
85 # <a Ruby bridge method>
86 # * ^2 *******
87 #
88 # topaz 1> frame 18
89 # 18 SchemaStatements >> initialize_schema_migrations_table (envId 1) @11 line 5
90 # receiver [112172801 MysqlAdapter] aMysqlAdapter
91 # old_version nil
92 # si_table nil
93 # sm_table [112167937 sz:17 String] schema_migrations
94 # topaz 1> list
95 # def initialize_schema_migrations_table
96 # sm_table = ActiveRecord::Migrator.schema_migrations_table_name
97 #
98 # unless tables.detect { |t| t == sm_table }
99 # create_table(sm_table, :id => false) do |schema_migrations_table|
100 # * ^11
101 # schema_migrations_table.column :version, :string, :null => false
102 # end
103 # add_index sm_table, :version, :unique => true,
104 # :name => 'unique_schema_migrations'
105 #
106 # # Backwards-compatibility: if we find schema_info, assume we've
107 # # migrated up to that point:
108 # si_table = Base.table_name_prefix + 'schema_info' + Base.table_name_suffix
109 #
110 # if tables.detect { |t| t == si_table }
111 #
112 # old_version = select_value("SELECT version FROM #{quote_table_name(si_table)}").to_i
113 # assume_migrated_upto_version(old_version)
114 # drop_table(si_table)
115 #
116 # # method starts at line 316 of file /Users/lattam/Projects/MagLev/working/maglev_test-save/vendor/rails-save/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
117 # topaz 1>
118 #
119 #
Something went wrong with that request. Please try again.