~ubuntu-branches/ubuntu/hardy/ruby1.8/hardy-updates

« back to all changes in this revision

Viewing changes to debian/patches/120_prevent_loading_twice.patch

  • Committer: Bazaar Package Importer
  • Author(s): akira yamada
  • Date: 2007-03-13 22:11:58 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070313221158-h3oql37brlaf2go2
Tags: 1.8.6-1
* new upstream version, 1.8.6.
* libruby1.8 conflicts with libopenssl-ruby1.8 (< 1.8.6) (closes: #410018)
* changed packaging style to cdbs from dbs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
* eval.c (rb_require_safe): prevent loading twice from extensions.
2
 
  fixed: [ruby-dev:29523]
3
 
 
4
 
diff -ruN ruby-1.8.5.orig/eval.c ruby-1.8.5/eval.c
5
 
--- ruby-1.8.5.orig/eval.c      2006-08-07 12:43:39.000000000 +0900
6
 
+++ ruby-1.8.5/eval.c   2006-09-19 15:08:59.000000000 +0900
7
 
@@ -7150,15 +7150,15 @@
8
 
            }
9
 
            else {
10
 
                ruby_safe_level = 0;
11
 
+               /* loading ruby library should be serialized. */
12
 
+               if (!loading_tbl) {
13
 
+                   loading_tbl = st_init_strtable();
14
 
+               }
15
 
+               /* partial state */
16
 
+               ftptr = ruby_strdup(RSTRING_PTR(feature));
17
 
+               st_insert(loading_tbl, (st_data_t)ftptr, (st_data_t)curr_thread);
18
 
                switch (found) {
19
 
                  case 'r':
20
 
-                   /* loading ruby library should be serialized. */
21
 
-                   if (!loading_tbl) {
22
 
-                       loading_tbl = st_init_strtable();
23
 
-                   }
24
 
-                   /* partial state */
25
 
-                   ftptr = ruby_strdup(RSTRING(feature)->ptr);
26
 
-                   st_insert(loading_tbl, (st_data_t)ftptr, (st_data_t)curr_thread);
27
 
                    rb_load(path, 0);
28
 
                    break;
29