1 |
graaff 08/06/29 20:55:02 |
2 |
|
3 |
Added: ruby-1.8.6-revert-r15856.patch |
4 |
Log: |
5 |
Version bump for ruby 1.8.6, fixing #225465 |
6 |
(Portage version: 2.1.4.4) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 dev-lang/ruby/files/ruby-1.8.6-revert-r15856.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/files/ruby-1.8.6-revert-r15856.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/ruby/files/ruby-1.8.6-revert-r15856.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: ruby-1.8.6-revert-r15856.patch |
15 |
=================================================================== |
16 |
$ svn diff -c -15856 http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8 |
17 |
|
18 |
Revert the following commit since it breaks Rails 2.0 |
19 |
------------------------------------------------------------------------ |
20 |
r15856 | matz | 2008-03-30 00:47:54 +0900 (Sun, 30 Mar 2008) | 2 lines |
21 |
Changed paths: |
22 |
M /branches/ruby_1_8/ChangeLog |
23 |
M /branches/ruby_1_8/class.c |
24 |
|
25 |
* class.c (clone_method): should copy cref as well. |
26 |
[ruby-core:15833] |
27 |
|
28 |
|
29 |
|
30 |
$ svn diff -c -15856 http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8 |
31 |
|
32 |
Revert the following commit since it breaks Rails 2.0 |
33 |
------------------------------------------------------------------------ |
34 |
r15856 | matz | 2008-03-30 00:47:54 +0900 (Sun, 30 Mar 2008) | 2 lines |
35 |
Changed paths: |
36 |
M /branches/ruby_1_8/ChangeLog |
37 |
M /branches/ruby_1_8/class.c |
38 |
|
39 |
* class.c (clone_method): should copy cref as well. |
40 |
[ruby-core:15833] |
41 |
|
42 |
|
43 |
|
44 |
Index: ruby-1.8.6-p230/class.c |
45 |
=================================================================== |
46 |
--- ruby-1.8.6-p230.orig/class.c |
47 |
+++ ruby-1.8.6-p230/class.c |
48 |
@@ -48,26 +48,13 @@ rb_class_new(super) |
49 |
return rb_class_boot(super); |
50 |
} |
51 |
|
52 |
-struct clone_method_data { |
53 |
- st_table *tbl; |
54 |
- VALUE klass; |
55 |
-}; |
56 |
- |
57 |
static int |
58 |
-clone_method(mid, body, data) |
59 |
+clone_method(mid, body, tbl) |
60 |
ID mid; |
61 |
NODE *body; |
62 |
- struct clone_method_data *data; |
63 |
+ st_table *tbl; |
64 |
{ |
65 |
- NODE *fbody = body->nd_body; |
66 |
- |
67 |
- if (fbody && nd_type(fbody) == NODE_SCOPE) { |
68 |
- VALUE cref = data->klass ? |
69 |
- (VALUE)NEW_NODE(NODE_CREF,data->klass,0,fbody->nd_rval) : |
70 |
- fbody->nd_rval; |
71 |
- fbody = NEW_NODE(NODE_SCOPE, fbody->nd_tbl, cref, fbody->nd_next); |
72 |
- } |
73 |
- st_insert(data->tbl, mid, (st_data_t)NEW_METHOD(fbody, body->nd_noex)); |
74 |
+ st_insert(tbl, mid, (st_data_t)NEW_METHOD(body->nd_body, body->nd_noex)); |
75 |
return ST_CONTINUE; |
76 |
} |
77 |
|
78 |
@@ -78,8 +65,7 @@ rb_mod_init_copy(clone, orig) |
79 |
{ |
80 |
rb_obj_init_copy(clone, orig); |
81 |
if (!FL_TEST(CLASS_OF(clone), FL_SINGLETON)) { |
82 |
- RBASIC(clone)->klass = RBASIC(orig)->klass; |
83 |
- RBASIC(clone)->klass = rb_singleton_class_clone(clone); |
84 |
+ RBASIC(clone)->klass = rb_singleton_class_clone(orig); |
85 |
} |
86 |
RCLASS(clone)->super = RCLASS(orig)->super; |
87 |
if (RCLASS(orig)->iv_tbl) { |
88 |
@@ -92,12 +78,9 @@ rb_mod_init_copy(clone, orig) |
89 |
st_delete(RCLASS(clone)->iv_tbl, (st_data_t*)&id, 0); |
90 |
} |
91 |
if (RCLASS(orig)->m_tbl) { |
92 |
- struct clone_method_data data; |
93 |
- |
94 |
- data.tbl = RCLASS(clone)->m_tbl = st_init_numtable(); |
95 |
- data.klass = (VALUE)clone; |
96 |
- |
97 |
- st_foreach(RCLASS(orig)->m_tbl, clone_method, (st_data_t)&data); |
98 |
+ RCLASS(clone)->m_tbl = st_init_numtable(); |
99 |
+ st_foreach(RCLASS(orig)->m_tbl, clone_method, |
100 |
+ (st_data_t)RCLASS(clone)->m_tbl); |
101 |
} |
102 |
|
103 |
return clone; |
104 |
@@ -143,22 +126,9 @@ rb_singleton_class_clone(obj) |
105 |
if (RCLASS(klass)->iv_tbl) { |
106 |
clone->iv_tbl = st_copy(RCLASS(klass)->iv_tbl); |
107 |
} |
108 |
- { |
109 |
- struct clone_method_data data; |
110 |
- |
111 |
- data.tbl = clone->m_tbl = st_init_numtable(); |
112 |
- switch (TYPE(obj)) { |
113 |
- case T_CLASS: |
114 |
- case T_MODULE: |
115 |
- data.klass = obj; |
116 |
- break; |
117 |
- default: |
118 |
- data.klass = 0; |
119 |
- break; |
120 |
- } |
121 |
- |
122 |
- st_foreach(RCLASS(klass)->m_tbl, clone_method, (st_data_t)&data); |
123 |
- } |
124 |
+ clone->m_tbl = st_init_numtable(); |
125 |
+ st_foreach(RCLASS(klass)->m_tbl, clone_method, |
126 |
+ (st_data_t)clone->m_tbl); |
127 |
rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone); |
128 |
FL_SET(clone, FL_SINGLETON); |
129 |
return (VALUE)clone; |
130 |
|
131 |
|
132 |
|
133 |
-- |
134 |
gentoo-commits@l.g.o mailing list |