summaryrefslogtreecommitdiffstats
path: root/ruby-1.8.7-p352-path-uniq.patch
blob: f930de1697b3a37f21adab8a4b46bf5059047c30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
--- ruby-1.8.7-p352/array.c.pathuniq	2009-02-05 08:55:33.000000000 +0900
+++ ruby-1.8.7-p352/array.c	2011-07-16 09:44:35.000000000 +0900
@@ -2954,7 +2954,7 @@
  *     b.uniq!   #=> nil
  */
 
-static VALUE
+GCC_VISIBILITY_HIDDEN VALUE
 rb_ary_uniq_bang(ary)
     VALUE ary;
 {
@@ -2987,7 +2987,7 @@
  *     a.uniq   #=> ["a", "b", "c"]
  */
 
-static VALUE
+GCC_VISIBILITY_HIDDEN VALUE
 rb_ary_uniq(ary)
     VALUE ary;
 {
--- ruby-1.8.7-p352/intern.h.pathuniq	2011-05-23 13:49:40.000000000 +0900
+++ ruby-1.8.7-p352/intern.h	2011-07-16 09:43:10.000000000 +0900
@@ -18,6 +18,11 @@
  */
 
 #define ID_ALLOCATOR 1
+#ifdef __GNUC__
+#define GCC_VISIBILITY_HIDDEN __attribute__ ((visibility("hidden")))
+#else
+#define GCC_VISIBILITY_HIDDEN
+#endif
 
 /* array.c */
 void rb_mem_clear _((register VALUE*, register long));
@@ -44,6 +49,8 @@
 VALUE rb_ary_reverse _((VALUE));
 VALUE rb_ary_sort _((VALUE));
 VALUE rb_ary_sort_bang _((VALUE));
+GCC_VISIBILITY_HIDDEN VALUE rb_ary_uniq _((VALUE));
+GCC_VISIBILITY_HIDDEN VALUE rb_ary_uniq_bang _((VALUE));
 VALUE rb_ary_delete _((VALUE, VALUE));
 VALUE rb_ary_delete_at _((VALUE, long));
 VALUE rb_ary_clear _((VALUE));
--- ruby-1.8.7-p352/ruby.c.pathuniq	2011-07-16 08:54:11.000000000 +0900
+++ ruby-1.8.7-p352/ruby.c	2011-07-16 09:36:13.000000000 +0900
@@ -341,6 +341,8 @@
     if (rb_safe_level() == 0) {
 	incpush(".");
     }
+
+    rb_load_path = rb_ary_uniq(rb_load_path);
 }
 
 struct req_list {