Commit bfd28d5
authored
make rb_singleton_class ractor safe (ruby#15591)
Since singleton classes are created lazily, we need to make sure that
we lock around their creation. Unfortunately, that means we need to
lock around every shareable object's call to `singleton_class`,
including classes and modules.1 parent f133ebb commit bfd28d5
3 files changed
+39
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
2823 | 2824 | | |
2824 | 2825 | | |
2825 | 2826 | | |
2826 | | - | |
| 2827 | + | |
2827 | 2828 | | |
2828 | 2829 | | |
2829 | 2830 | | |
| |||
2851 | 2852 | | |
2852 | 2853 | | |
2853 | 2854 | | |
2854 | | - | |
2855 | | - | |
2856 | | - | |
2857 | | - | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
2858 | 2874 | | |
2859 | | - | |
2860 | | - | |
2861 | 2875 | | |
2862 | 2876 | | |
2863 | 2877 | | |
| |||
2900 | 2914 | | |
2901 | 2915 | | |
2902 | 2916 | | |
2903 | | - | |
2904 | | - | |
2905 | | - | |
2906 | | - | |
2907 | | - | |
2908 | | - | |
| 2917 | + | |
2909 | 2918 | | |
2910 | 2919 | | |
2911 | 2920 | | |
| |||
2923 | 2932 | | |
2924 | 2933 | | |
2925 | 2934 | | |
2926 | | - | |
| 2935 | + | |
2927 | 2936 | | |
2928 | 2937 | | |
2929 | 2938 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1403 | 1403 | | |
1404 | 1404 | | |
1405 | 1405 | | |
| 1406 | + | |
1406 | 1407 | | |
1407 | 1408 | | |
1408 | 1409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
933 | 948 | | |
0 commit comments